nixos/modules/config/resolvconf.nix: skip systemPackages if disabled
A change made in #166308 added `networking.resolvconf.package` to the `environment.systemPackages` list, so it is installed as part of the system image. However it does so unconditionally, meaning that even if the `config.networking.resolvconf.enable` is set to false the package listed in the `networking.resolvconf.package` would still be intalled. This change makes it so the package installation will depend on the status of the `config.networking.resolvconf.enable` option instead.
This commit is contained in:
parent
5e2ca1e02f
commit
d86e9911cd
1 changed files with 2 additions and 2 deletions
|
@ -132,13 +132,13 @@ in
|
|||
exit 1
|
||||
''
|
||||
else configText;
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
}
|
||||
|
||||
(mkIf cfg.enable {
|
||||
networking.resolvconf.package = pkgs.openresolv;
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
systemd.services.resolvconf = {
|
||||
description = "resolvconf update";
|
||||
|
||||
|
|
Loading…
Reference in a new issue