From 4402d724bb857dbb1588d5173755b5634800b9a4 Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 6 May 2021 01:09:09 +0200 Subject: [PATCH] nixos-module/container/anon: make nat, iproute2 config optional --- nix/nixos-module/container/anon.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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