From 6bd43bf321243dfa421b5c89bf3cf23646babca4 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Mon, 24 Nov 2025 10:06:54 +0000 Subject: [PATCH] flake: push down `homeManagerModules` warning Push the rename warning down to the actual attributes, to avoid printing it too early. Additionally, bind the warning to top-level static value, to avoid printing it multiple times. Simplify `oldestSupportedReleaseIsAtLeast 2505` to `true`, assuming this will not be backported. --- flake/wrappers.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/flake/wrappers.nix b/flake/wrappers.nix index 2fda9682..2d2d437b 100644 --- a/flake/wrappers.nix +++ b/flake/wrappers.nix @@ -5,6 +5,9 @@ }: let inherit (lib.modules) importApply; + # Added 2025-05-25; warning shown since 2025-08-01 (25.11) + # NOTE: top-level binding of a fully resolved value, to avoid printing multiple times + homeManagerModulesWarning = lib.warn "nixvim: flake output `homeManagerModules` has been renamed to `homeModules`." null; in { perSystem = @@ -28,13 +31,7 @@ in default = self.nixosModules.nixvim; }; # Alias for backward compatibility - # Added 2025-05-25 in https://github.com/nix-community/nixvim/pull/3387 - homeManagerModules = - let - cond = lib.trivial.oldestSupportedReleaseIsAtLeast 2505; - msg = "nixvim: flake output `homeManagerModules` has been renamed to `homeModules`."; - in - lib.warnIf cond msg self.homeModules; + homeManagerModules = lib.mapAttrs (_: lib.seq homeManagerModulesWarning) self.homeModules; homeModules = { nixvim = importApply ../wrappers/hm.nix self; default = self.homeModules.nixvim;