Merge pull request #75193 from Ma27/optional-networkd-gateway
nixos/networkd: only set gateway if it's explicitly specified in the module system
This commit is contained in:
commit
0f783bc7ca
1 changed files with 2 additions and 2 deletions
|
@ -60,8 +60,8 @@ in
|
|||
let
|
||||
domains = cfg.search ++ (optional (cfg.domain != null) cfg.domain);
|
||||
genericNetwork = override:
|
||||
let gateway = optional (cfg.defaultGateway != null) cfg.defaultGateway.address
|
||||
++ optional (cfg.defaultGateway6 != null) cfg.defaultGateway6.address;
|
||||
let gateway = optional (cfg.defaultGateway != null && (cfg.defaultGateway.address or "") != "") cfg.defaultGateway.address
|
||||
++ optional (cfg.defaultGateway6 != null && (cfg.defaultGateway6.address or "") != "") cfg.defaultGateway6.address;
|
||||
in optionalAttrs (gateway != [ ]) {
|
||||
routes = override [
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue