introducing tests
This commit is contained in:
parent
708a7304f7
commit
2097c0a290
3 changed files with 44 additions and 0 deletions
|
@ -78,5 +78,7 @@
|
||||||
../../modules/wm_and_de
|
../../modules/wm_and_de
|
||||||
|
|
||||||
../../modules/pkg_mgrmnt
|
../../modules/pkg_mgrmnt
|
||||||
|
|
||||||
|
../../tests/glitchtip-container.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
5
tests/default.nix
Normal file
5
tests/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./glitchtip-container.nix
|
||||||
|
];
|
||||||
|
}
|
37
tests/glitchtip-container.nix
Normal file
37
tests/glitchtip-container.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue