weee
This commit is contained in:
parent
39edfefa58
commit
e671f877d9
4 changed files with 26 additions and 8 deletions
|
@ -7,8 +7,11 @@ let
|
|||
name = "forgejo";
|
||||
|
||||
hostDataDir = "/var/lib/${name}";
|
||||
hostAddress = "10.0.0.1";
|
||||
containerAddress = "10.0.0.2";
|
||||
hostAddress6 = "fc00::1";
|
||||
containerAddress6 = "fc00::2";
|
||||
hostBridge = "br0";
|
||||
|
||||
binds = [
|
||||
# Postgres data, must use postgres user in container and host
|
||||
|
@ -80,6 +83,8 @@ in
|
|||
ephemeral = true;
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = hostAddress;
|
||||
localAddress = containerAddress;
|
||||
hostAddress6 = hostAddress6;
|
||||
localAddress6 = containerAddress6;
|
||||
bindMounts = lib.foldl (
|
||||
|
@ -100,13 +105,15 @@ in
|
|||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 3000 3032 ];
|
||||
allowedTCPPorts = [
|
||||
3000
|
||||
3032
|
||||
];
|
||||
};
|
||||
# Use systemd-resolved inside the container
|
||||
# Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
|
||||
useHostResolvConf = lib.mkForce false;
|
||||
};
|
||||
|
||||
services.resolved.enable = true;
|
||||
|
||||
# Ensure users exist on container
|
||||
|
@ -163,6 +170,8 @@ in
|
|||
DISABLE_ORGANIZATIONS_PAGE = true;
|
||||
};
|
||||
repository = {
|
||||
# ENABLE_PUSH_CREATE_USER = true;
|
||||
# ENABLE_PUSH_CREATE_ORG = true;
|
||||
DISABLE_STARS = true;
|
||||
DEFAULT_PRIVATE = "private";
|
||||
};
|
||||
|
@ -175,6 +184,10 @@ in
|
|||
SHOW_FOOTER_VERSION = false;
|
||||
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false;
|
||||
};
|
||||
migrations = {
|
||||
ALLOWED_DOMAINS = "*.github.com,github.com";
|
||||
ALLOW_LOCALNETWORKS = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -40,7 +40,7 @@ with lib;
|
|||
date_short = "date +'%Y-%m-%d'";
|
||||
ls = "ls --color -Gah";
|
||||
ll = "ls --color -Galh";
|
||||
lss = "du --max-depth=0 -h * 2>/dev/null | sort -hr";
|
||||
lss = "du --max-depth=0 -h {.,}* 2>/dev/null | sort -hr";
|
||||
psg = "ps aux | head -n 1 && ps aux | grep -v 'grep' | grep";
|
||||
cl = "clear";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue