From 49f95aa8fd6d8d78652a088249938f12f14cbbda Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 10 Mar 2021 16:38:32 +0100 Subject: [PATCH] lib/default.nix: add gateway config for networkd --- lib/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/default.nix b/lib/default.nix index a507c1f4..9a46c115 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -168,6 +168,16 @@ in { in if cfg.mapHqHosts then hqLocalHosts else { }; + systemd.network.networks = + if cfg.hq.interface != null && config.networking.useNetworkd + then { + "40-eth0".routes = [ { + routeConfig = { + Gateway = "172.22.99.4"; + GatewayOnLink = true; + }; + } ]; + } else {}; networking.interfaces = /* (if cfg.hq.externalInterface == null then { }