mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-16 05:51:08 +01:00
nh: remove .nix suffix check for flake paths (#7600)
This commit is contained in:
parent
e102920c1b
commit
187e0af20a
1 changed files with 3 additions and 16 deletions
|
|
@ -100,21 +100,8 @@ in
|
||||||
lib.optional (cfg.clean.enable && config.nix.gc.automatic)
|
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.";
|
"programs.nh.clean.enable and nix.gc.automatic (Home-Manager) are both enabled. Please use one or the other to avoid conflict.";
|
||||||
|
|
||||||
assertions =
|
assertions = lib.optionals pkgs.stdenv.isDarwin [
|
||||||
(lib.optionals pkgs.stdenv.isDarwin [
|
|
||||||
(lib.hm.darwin.assertInterval "programs.nh.clean.dates" cfg.clean.dates pkgs)
|
(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"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home = lib.mkIf cfg.enable {
|
home = lib.mkIf cfg.enable {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue