Files
nixos/Droidnix/generated/modules/desktop/stylix.nix
T
2026-03-19 06:59:08 +00:00

68 lines
1.6 KiB
Nix

{ lib, pkgs, flakeRoot, ... }:
let
username = "henrov";
in
{
flake.nixosModules.stylix = { config, pkgs, lib, ... }:
let
# --- Default stylix config ---
stylixCfg = {
enable = true;
base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
image = "${flakeRoot}/assets/hyprland/wallpaperstuff/pictures/wall1.jpg";
polarity = "dark";
cursor = {
package = pkgs.phinger-cursors;
name = "phinger-cursors-light";
size = 24;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.fira-code;
name = "Fira Code Nerd Font";
};
sansSerif = {
package = pkgs.lato;
name = "Lato";
};
};
icons = {
enable = true;
package = pkgs.papirus-icon-theme;
dark = "Papirus-Dark";
light = "Papirus-Light";
};
};
in
{
options.mySystem.desktop.stylix.enable =
lib.mkEnableOption "Enable Stylix System Theming";
config = lib.mkIf (stylixCfg.enable or false) {
# --- Desktop / wallpaper packages ---
mySystem.apps.wallpaper = {
enable = true;
packages = [ "feh" "st" ];
};
# --- Stylix theming ---
stylix = stylixCfg;
# --- Home session variables ---
home-manager.users.${username}.home.sessionVariables = {
XCURSOR_THEME = stylixCfg.cursor.name;
XCURSOR_SIZE = toString stylixCfg.cursor.size;
HYPRCURSOR_THEME = stylixCfg.cursor.name;
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
};
};
};
}