mirror of
https://github.com/nix-community/home-manager
synced 2025-01-30 12:55:02 +01:00
nh: check osConfig for null before accessing
This commit is contained in:
parent
7b9ece1bf3
commit
a2362a6496
1 changed files with 2 additions and 2 deletions
|
@ -52,8 +52,8 @@ in {
|
|||
};
|
||||
|
||||
config = {
|
||||
warnings = lib.optionals (!(cfg.clean.enable -> !osConfig.nix.gc.automatic))
|
||||
[
|
||||
warnings = lib.optionals
|
||||
(osConfig != null && !(cfg.clean.enable -> !osConfig.nix.gc.automatic)) [
|
||||
"programs.nh.clean.enable and nix.gc.automatic (system-wide in configuration.nix) are both enabled. Please use one or the other to avoid conflict."
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue