diff --git a/hosts/crocoite/crocoite.nix b/hosts/crocoite/crocoite.nix index c48608e..0ba6191 100644 --- a/hosts/crocoite/crocoite.nix +++ b/hosts/crocoite/crocoite.nix @@ -78,5 +78,7 @@ ../../modules/wm_and_de ../../modules/pkg_mgrmnt + + ../../tests/glitchtip-container.nix ]; } diff --git a/tests/default.nix b/tests/default.nix new file mode 100644 index 0000000..9258c1c --- /dev/null +++ b/tests/default.nix @@ -0,0 +1,5 @@ +{...}: { + imports = [ + ./glitchtip-container.nix + ]; +} diff --git a/tests/glitchtip-container.nix b/tests/glitchtip-container.nix new file mode 100644 index 0000000..37fcb15 --- /dev/null +++ b/tests/glitchtip-container.nix @@ -0,0 +1,37 @@ +{ ... }: { + networking.nat = { + enable = true; + internalInterfaces = [ "ve-+" ]; + externalInterface = "ens3"; + # Lazy IPv6 connectivity for the container + enableIPv6 = true; + }; + + containers.webserver = { + autoStart = true; + privateNetwork = true; + hostAddress = "192.168.100.10"; + localAddress = "192.168.100.11"; + hostAddress6 = "fc00::1"; + localAddress6 = "fc00::2"; + config = { config, pkgs, lib, ... }: { + + services.httpd = { + enable = true; + adminAddr = "admin@example.org"; + }; + + networking = { + firewall.allowedTCPPorts = [ 80 ]; + + # Use systemd-resolved inside the container + # Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686 + useHostResolvConf = lib.mkForce false; + }; + + services.resolved.enable = true; + + system.stateVersion = "24.11"; + }; + }; +}