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

This commit is contained in:
Astro 2021-05-06 01:09:09 +02:00
parent 0aa4169dcb
commit 4402d724bb
1 changed files with 2 additions and 2 deletions

View File

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