From 11d6a8031710c77febe81682b27c04742d9b522e Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 6 Apr 2021 22:00:25 +0200 Subject: [PATCH] nixos-module/network: enable forwarding --- nix/nixos-module/network.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nix/nixos-module/network.nix b/nix/nixos-module/network.nix index 3c2f6bd..a2d64dc 100644 --- a/nix/nixos-module/network.nix +++ b/nix/nixos-module/network.nix @@ -33,9 +33,12 @@ in builtins.mapAttrs (ifName: { gw4, gw6, ... }: let netConfig = config.site.net.${ifName}; - in { + in rec { matchConfig.Name = ifName; + networkConfig.IPForward = + (builtins.length addresses) > 0; + addresses = let address = netConfig.hosts4.${hostName};