lib/default.nix: add gateway config for networkd

This commit is contained in:
Astro 2021-03-10 16:38:32 +01:00
parent 3a220d91a2
commit 49f95aa8fd
1 changed files with 10 additions and 0 deletions

View File

@ -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
{ }