From 187e0af20adf97f799992bf2821a123b7c4dfb3b Mon Sep 17 00:00:00 2001 From: awwpotato Date: Sat, 2 Aug 2025 13:43:23 -0700 Subject: [PATCH] nh: remove .nix suffix check for flake paths (#7600) --- modules/programs/nh.nix | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/modules/programs/nh.nix b/modules/programs/nh.nix index 5b334170f..940676860 100644 --- a/modules/programs/nh.nix +++ b/modules/programs/nh.nix @@ -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 ];