diff --git a/ServeNix/configuration.nix b/ServeNix/configuration.nix index b40ea2e..ba3e561 100644 --- a/ServeNix/configuration.nix +++ b/ServeNix/configuration.nix @@ -18,6 +18,7 @@ # My own stuff ./services/airsignal.nix ./services/heidi.nix + ./services/formula10.nix # General ./services/authelia.nix @@ -27,7 +28,6 @@ ./services/homepage.nix ./services/immich.nix ./services/kopia.nix - ./services/memos.nix ./services/nextcloud.nix ./services/nginx-proxy-manager.nix ./services/portainer.nix @@ -103,6 +103,8 @@ defaultGateway = "192.168.86.5"; nameservers = [ "127.0.0.1" + # "192.168.86.25" + # "8.8.8.8" ]; }; @@ -120,6 +122,10 @@ # crash the whole service. check=$(${dockercli} network ls | grep ${network} || true) if [ -z "$check" ]; then + # TODO: Disable IP masquerading to show individual containers in AdGuard/Pi-Hole + # - Disabling this prevents containers from having internet connection. DNS issue? + # ${dockercli} network create -o "com.docker.network.bridge.enable_ip_masquerade"="false" ${network} + ${dockercli} network create ${network} else echo "${network} already exists in docker" @@ -220,6 +226,17 @@ # enable = true; # setSocketVariable = true; # }; + daemon.settings = { + dns = [ + # TODO: Does this circumvent my DNS for each container? + # It might improve gitea actions though... + "8.8.8.8" + + # TODO: Might prevent containers from having DNS? + # "127.0.0.1" + # "192.168.86.25" + ]; + }; }; oci-containers.backend = "docker"; }; @@ -272,6 +289,8 @@ ntp.enable = true; qemuGuest.enable = true; + # TODO: Might prevent containers from having working DNS + # resolved.fallbackDns = ["8.8.8.8"]; }; networking.firewall = { diff --git a/ServeNix/services/formula10.nix b/ServeNix/services/formula10.nix new file mode 100644 index 0000000..28a1573 --- /dev/null +++ b/ServeNix/services/formula10.nix @@ -0,0 +1,28 @@ +{ + config, + lib, + pkgs, + ... +}: { + virtualisation.oci-containers.containers.formula10 = { + image = "gitea.vps.chriphost.de/christoph/formula10:latest"; + autoStart = true; + + dependsOn = []; + + ports = [ + "55555:5000" + ]; + + volumes = [ + "formula10_data:/app/instance" + ]; + + environment = {}; + + extraOptions = [ + "--init" # Make an init process take up PID 1, to make python receive the SIGTERM + "--net=behind-nginx" + ]; + }; +} diff --git a/ServeNix/services/kopia.nix b/ServeNix/services/kopia.nix index e002628..8a18ef8 100644 --- a/ServeNix/services/kopia.nix +++ b/ServeNix/services/kopia.nix @@ -36,6 +36,7 @@ "box-stash_generated:/data/box-stash_generated:ro" "box-stash_metadata:/data/box-stash_metadata:ro" "fileflows_config:/data/fileflows_config:ro" + "formula10_data:/data/formula10_data:ro" "gitea-db_data:/data/gitea-db_data:ro" "gitea-runner_config:/data/gitea-runner_config:ro" "gitea-runner_data:/data/gitea-runner_data:ro"