nixos-module/container/anon: make nat, iproute2 config optional

This commit is contained in:
Astro 2021-05-06 01:09:09 +02:00
rodič 0aa4169dcb
revize 4402d724bb
1 změnil soubory, kde provedl 2 přidání a 2 odebrání

Zobrazit soubor

@ -98,7 +98,7 @@ in
'';
}) tunnels;
networking.nat = lib.optionalAttrs enabled {
networking.nat = lib.mkIf enabled {
enable = true;
enableIPv6 = true;
internalInterfaces = [ "core" ];
@ -107,7 +107,7 @@ in
};
# Configure rt_table name
networking.iproute2 = {
networking.iproute2 = lib.mkIf enabled {
enable = true;
rttablesExtraConfig = ''
${toString vpn4Table} vpn4