1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

nh: remove .nix suffix check for flake paths (#7600)

This commit is contained in:
awwpotato 2025-08-02 13:43:23 -07:00 committed by GitHub
parent e102920c1b
commit 187e0af20a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,22 +100,9 @@ in
lib.optional (cfg.clean.enable && config.nix.gc.automatic)
"programs.nh.clean.enable and nix.gc.automatic (Home-Manager) are both enabled. Please use one or the other to avoid conflict.";
assertions =
(lib.optionals pkgs.stdenv.isDarwin [
(lib.hm.darwin.assertInterval "programs.nh.clean.dates" cfg.clean.dates pkgs)
])
++
map
(name: {
assertion = (cfg.${name} != null) -> !(lib.hasSuffix ".nix" cfg.${name});
message = "nh.${name} must be a directory, not a nix file";
})
[
"darwinFlake"
"flake"
"homeFlake"
"osFlake"
];
assertions = lib.optionals pkgs.stdenv.isDarwin [
(lib.hm.darwin.assertInterval "programs.nh.clean.dates" cfg.clean.dates pkgs)
];
home = lib.mkIf cfg.enable {
packages = [ cfg.package ];