refactor(theming): simplify stylix module #176

Merged
alexion merged 1 commits from refactor/theming-module-cleanup into main 2026-10-11 22:44:54 -04:00

View File

@@ -6,15 +6,13 @@
}: }:
# Nord theming for the graphical layer, driven from one base16 scheme by Stylix. # Nord theming for the graphical layer, driven from one base16 scheme by Stylix.
let let
# A single static Nord wallpaper, drawn as a vertical gradient across the # A single static Nord wallpaper, drawn as a vertical gradient across the
# Polar Night shades so it needs no committed binary and no network fetch. # Polar Night shades so it needs no committed binary and no network fetch.
wallpaper = pkgs.runCommand "nord-wallpaper.png" { } '' wallpaper = pkgs.runCommand "nord-wallpaper.png" { } ''
${pkgs.imagemagick}/bin/magick \ ${lib.getExe pkgs.imagemagick} \
-size 2560x1440 gradient:'#2E3440'-'#3B4252' \ -size 2560x1440 gradient:'#2E3440'-'#3B4252' \
"$out" "$out"
''; '';
user = config.user.name;
in in
{ {
options.modules.desktop.utilities.theming.enable = options.modules.desktop.utilities.theming.enable =
@@ -58,12 +56,8 @@ in
}; };
}; };
}; };
registry.env.${config.networking.hostName} = {
HYPRCURSOR_THEME = config.stylix.cursor.name;
HYPRCURSOR_SIZE = toString config.stylix.cursor.size;
};
home-manager.users.${user} = { home-manager.users.${config.user.name} = {
# Stylix drives the cursor through home-manager's pointer-cursor config, # Stylix drives the cursor through home-manager's pointer-cursor config,
# whose generation must be switched on explicitly. # whose generation must be switched on explicitly.
home.pointerCursor.enable = true; home.pointerCursor.enable = true;
@@ -72,5 +66,10 @@ in
# base16 mapping Stylix would apply, so its target stays off. # base16 mapping Stylix would apply, so its target stays off.
stylix.targets.nixvim.enable = false; stylix.targets.nixvim.enable = false;
}; };
registry.env.${config.networking.hostName} = {
HYPRCURSOR_THEME = config.stylix.cursor.name;
HYPRCURSOR_SIZE = toString config.stylix.cursor.size;
};
}; };
} }