diff --git a/tests/glitchtip-container.nix b/tests/glitchtip-container.nix index 37fcb15..931b206 100644 --- a/tests/glitchtip-container.nix +++ b/tests/glitchtip-container.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ nixos-unstable, inputs, ... }: +{ networking.nat = { enable = true; internalInterfaces = [ "ve-+" ]; @@ -7,31 +8,62 @@ 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, ... }: { + containers.glitchtip = + { + autoStart = true; + privateNetwork = true; + hostAddress = "192.168.100.10"; + localAddress = "192.168.100.11"; + hostAddress6 = "fc00::1"; + localAddress6 = "fc00::2"; + path = (nixos-unstable.lib.nixosSystem { + system = "x86_64-linux"; + modules = [{ + boot.isContainer = true; + #services.glitchtip = { + # enable = true; + # listenAddress = "0.0.0.0"; + # settings = { + # GLITCHTIP_DOMAIN = "http://localhost"; + # }; + #}; + #services = { + # logrotate.enable = lib.mkForce false; + # httpd = { + # enable = true; + # adminAddr = "admin@example.org"; + # }; + #}; - services.httpd = { - enable = true; - adminAddr = "admin@example.org"; - }; - networking = { - firewall.allowedTCPPorts = [ 80 ]; + # imports = [ + # #(modulesPath + "/profiles/perlless.nix") + # (modulesPath + "/profiles/minimal.nix") + # { + # environment.defaultPackages = [ ]; + # boot.kernel.enable = false; + # boot.isContainer = true; + # nixpkgs.overlays = [ (self: super: { }) ]; + # } + # ]; + # disabledModules = [ + # (modulesPath + "/profiles/all-hardware.nix") + # (modulesPath + "/profiles/base.nix") + # ]; - # Use systemd-resolved inside the container - # Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686 - useHostResolvConf = lib.mkForce false; - }; - services.resolved.enable = true; + networking = { + firewall.allowedTCPPorts = [ 80 ]; - system.stateVersion = "24.11"; + # Use systemd-resolved inside the container + # Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686 + useHostResolvConf = false; + }; + + services.resolved.enable = true; + + system.stateVersion = "25.05"; + }]; + }).outPath; }; - }; }