mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 17:49:07 +01:00
underlay: Refuse DNS servers from DHCP
This commit is contained in:
parent
70140d0af4
commit
d9a85536a2
1 changed files with 1 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ in
|
||||||
matchConfig.Name = cfg.interface;
|
matchConfig.Name = cfg.interface;
|
||||||
linkConfig.RequiredForOnline = "routable";
|
linkConfig.RequiredForOnline = "routable";
|
||||||
networkConfig.DHCP = lib.mkIf cfg.useDhcp "yes";
|
networkConfig.DHCP = lib.mkIf cfg.useDhcp "yes";
|
||||||
|
dhcpV4Config.UseDNS = lib.mkIf cfg.useDhcp false;
|
||||||
address = lib.optional (cfg.cidr != null) cfg.cidr;
|
address = lib.optional (cfg.cidr != null) cfg.cidr;
|
||||||
routes = lib.optional (cfg.gateway != null) {
|
routes = lib.optional (cfg.gateway != null) {
|
||||||
Gateway = cfg.gateway;
|
Gateway = cfg.gateway;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue