flake: include 'until' in rename warning
This commit is contained in:
parent
47553c06fb
commit
3945a2d349
2 changed files with 9 additions and 3 deletions
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
# Drop this alias after 26.05
|
||||
flake = lib.mkIf (!lib.oldestSupportedReleaseIsAtLeast 2605) {
|
||||
homeManagerModules = builtins.warn "stylix: flake output `homeManagerModules` has been renamed to `homeModules`" self.homeModules;
|
||||
homeManagerModules = builtins.warn "stylix: flake output `homeManagerModules` has been renamed to `homeModules` and will be removed after 26.05." self.homeModules;
|
||||
};
|
||||
|
||||
perSystem.stylix.aliases = [
|
||||
|
|
|
|||
|
|
@ -64,12 +64,18 @@
|
|||
system
|
||||
attr
|
||||
]) { inherit old new; };
|
||||
names = builtins.mapAttrs (_: lib.showAttrPath) paths;
|
||||
names = builtins.mapAttrs (_: lib.showAttrPath) paths // {
|
||||
until = lib.pipe until [
|
||||
builtins.toString
|
||||
(builtins.match "([[:digit:]]{2})([[:digit:]]{2})")
|
||||
(lib.concatStringsSep ".")
|
||||
];
|
||||
};
|
||||
in
|
||||
lib.mkIf (!lib.oldestSupportedReleaseIsAtLeast until) (
|
||||
lib.attrsets.setAttrByPath paths.old (
|
||||
lib.warnIf (since != null -> lib.oldestSupportedReleaseIsAtLeast since)
|
||||
"stylix: flake output `${names.old}` has been renamed to `${names.new}`."
|
||||
"stylix: flake output `${names.old}` has been renamed to `${names.new}` and will be removed after ${names.until}."
|
||||
(cfg.${output}.${new} or (throw "stylix: flake alias not found: ${names.new}"))
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue