introducing tests

This commit is contained in:
Ranomier 2025-03-27 19:09:00 +01:00
parent 708a7304f7
commit 2097c0a290
3 changed files with 44 additions and 0 deletions

View file

@ -78,5 +78,7 @@
../../modules/wm_and_de
../../modules/pkg_mgrmnt
../../tests/glitchtip-container.nix
];
}

5
tests/default.nix Normal file
View file

@ -0,0 +1,5 @@
{...}: {
imports = [
./glitchtip-container.nix
];
}

View file

@ -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";
};
};
}