11.stylix/flake/deprecated.nix
Matt Sturgeon 88e1c23df2
flake: fix and refactor the homeManagerModules alias (#1287)
Fixes: 0e5b1613bd ("stylix: rename homeManagerModules to homeModules (#1267)")
Link: https://github.com/danth/stylix/pull/1287

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-05-17 00:37:10 +02:00

19 lines
691 B
Nix

{
lib,
self,
...
}:
{
# NOTE: the `flake` submodule has a `lazyAttrsOf` freeform type.
#
# This means a `mkIf false` definition will not omit the attr, because
# `lazyAttrsOf` adds an "empty value" stub throwing "used but not defined".
#
# Therefore, instead of doing `flake.foo = mkIf` you should do `flake = mkIf (…) { foo = …; }`.
# If you need multiple definitions with different conditions, use `flake = mkMerge [ … ]`.
# 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;
};
}