Configure container for Wireguard NAT tests
This commit is contained in:
parent
7a704851c0
commit
ea047147b9
|
@ -3,6 +3,7 @@ let
|
||||||
utils = import ../../util/include.nix { lib = lib; };
|
utils = import ../../util/include.nix { lib = lib; };
|
||||||
imports =
|
imports =
|
||||||
(utils.includeDir ./services) ++
|
(utils.includeDir ./services) ++
|
||||||
|
(utils.includeDir ./containers) ++
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
containers.test = {
|
||||||
|
autoStart = true;
|
||||||
|
privateNetwork = true;
|
||||||
|
hostAddress = "192.168.100.10";
|
||||||
|
localAddress = "192.168.100.11";
|
||||||
|
config = { config, pkgs, ... }: {
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
firewall = {
|
||||||
|
enable = true;
|
||||||
|
allowedTCPPorts = [ 80 ];
|
||||||
|
};
|
||||||
|
useHostResolvConf = lib.mkForce false;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.resolved.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue