1
0
Fork 0
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:
Anton Tetov 2025-01-22 17:40:23 +01:00 committed by Robert Helgesson
parent 7b9ece1bf3
commit a2362a6496
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED

View file

@ -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."
];