nixos/networkd: only set gateway if it's explicitly specified in the module system
This commit is contained in:
parent
5368791937
commit
ff65638bfc
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