mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
networkmanager service: use resolved if enabled
This commit is contained in:
parent
a5a98f98a0
commit
12f54a5746
@ -9,11 +9,16 @@ let
|
||||
# /var/lib/misc is for dnsmasq.leases.
|
||||
stateDirs = "/var/lib/NetworkManager /var/lib/dhclient /var/lib/misc";
|
||||
|
||||
dns =
|
||||
if cfg.useDnsmasq then "dnsmasq"
|
||||
else if config.services.resolved.enable then "systemd-resolved"
|
||||
else "default";
|
||||
|
||||
configFile = writeText "NetworkManager.conf" ''
|
||||
[main]
|
||||
plugins=keyfile
|
||||
dhcp=${cfg.dhcp}
|
||||
dns=${if cfg.useDnsmasq then "dnsmasq" else "default"}
|
||||
dns=${dns}
|
||||
|
||||
[keyfile]
|
||||
${optionalString (cfg.unmanaged != [])
|
||||
|
Loading…
Reference in New Issue
Block a user