Browse Source

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

master
Astro 1 month ago
parent
commit
4402d724bb
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      nix/nixos-module/container/anon.nix

+ 2
- 2
nix/nixos-module/container/anon.nix View File

@@ -98,7 +98,7 @@ in
98 98
     '';
99 99
   }) tunnels;
100 100
 
101
-  networking.nat = lib.optionalAttrs enabled {
101
+  networking.nat = lib.mkIf enabled {
102 102
     enable = true;
103 103
     enableIPv6 = true;
104 104
     internalInterfaces = [ "core" ];
@@ -107,7 +107,7 @@ in
107 107
   };
108 108
 
109 109
   # Configure rt_table name
110
-  networking.iproute2 = {
110
+  networking.iproute2 = lib.mkIf enabled {
111 111
     enable = true;
112 112
     rttablesExtraConfig = ''
113 113
       ${toString vpn4Table} vpn4

Loading…
Cancel
Save