lib/default.nix: add gateway config for networkd
This commit is contained in:
parent
3a220d91a2
commit
49f95aa8fd
|
@ -168,6 +168,16 @@ in {
|
||||||
|
|
||||||
in if cfg.mapHqHosts then hqLocalHosts else { };
|
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 =
|
networking.interfaces =
|
||||||
/* (if cfg.hq.externalInterface == null then
|
/* (if cfg.hq.externalInterface == null then
|
||||||
{ }
|
{ }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user