Skip to content

Commit 6bd43bf

Browse files
committed
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.
1 parent 3dc952d commit 6bd43bf

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

flake/wrappers.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
}:
66
let
77
inherit (lib.modules) importApply;
8+
# Added 2025-05-25; warning shown since 2025-08-01 (25.11)
9+
# NOTE: top-level binding of a fully resolved value, to avoid printing multiple times
10+
homeManagerModulesWarning = lib.warn "nixvim: flake output `homeManagerModules` has been renamed to `homeModules`." null;
811
in
912
{
1013
perSystem =
@@ -28,13 +31,7 @@ in
2831
default = self.nixosModules.nixvim;
2932
};
3033
# Alias for backward compatibility
31-
# Added 2025-05-25 in https://github.com/nix-community/nixvim/pull/3387
32-
homeManagerModules =
33-
let
34-
cond = lib.trivial.oldestSupportedReleaseIsAtLeast 2505;
35-
msg = "nixvim: flake output `homeManagerModules` has been renamed to `homeModules`.";
36-
in
37-
lib.warnIf cond msg self.homeModules;
34+
homeManagerModules = lib.mapAttrs (_: lib.seq homeManagerModulesWarning) self.homeModules;
3835
homeModules = {
3936
nixvim = importApply ../wrappers/hm.nix self;
4037
default = self.homeModules.nixvim;

0 commit comments

Comments
 (0)