networkmanager: Add rc-manager option
Add an option to set the rc-manager parameter in NetworkManager.conf, which controls how NetworkManager handles resolv.conf. This sets the default rc-manager to "resolvconf", which solves #61490. It additionally allows the user to change rc-manager without interference from configuration activations.
This commit is contained in:
@@ -309,8 +309,11 @@ in
|
||||
ln -s /run/systemd/resolve/resolv.conf /run/resolvconf/interfaces/systemd
|
||||
''}
|
||||
|
||||
# Make sure resolv.conf is up to date if not managed manually or by systemd
|
||||
${optionalString (!config.environment.etc?"resolv.conf") ''
|
||||
# Make sure resolv.conf is up to date if not managed manually, by systemd or
|
||||
# by NetworkManager
|
||||
${optionalString (!config.environment.etc?"resolv.conf" &&
|
||||
(cfg.networkmanager.enable ->
|
||||
cfg.networkmanager.rc-manager == "resolvconf")) ''
|
||||
${pkgs.openresolv}/bin/resolvconf -u
|
||||
''}
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user