diff --git a/nix/nixos-module/container/anon.nix b/nix/nixos-module/container/anon.nix index 6f9af36..5803181 100644 --- a/nix/nixos-module/container/anon.nix +++ b/nix/nixos-module/container/anon.nix @@ -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