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>
This commit is contained in:
parent
31fff1c533
commit
88e1c23df2
3 changed files with 20 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./deprecated.nix
|
||||
./dev-shell.nix
|
||||
./modules.nix
|
||||
./packages.nix
|
||||
|
|
|
|||
19
flake/deprecated.nix
Normal file
19
flake/deprecated.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
@ -23,11 +23,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
# Drop this alias after 26.05
|
||||
homeManagerModules = lib.mkIf (lib.oldestSupportedReleaseIsAtLeast 2511) (
|
||||
builtins.warn "stylix: flake output `homeManagerModules` has been renamed to `homeModules`" self.homeModules
|
||||
);
|
||||
|
||||
homeModules.stylix =
|
||||
{ pkgs, ... }@args:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue