nichts/modules/style/gtk.nix
Bloxx12 53aaa26fa1 flake: inherit explicitly from parts of lib
Instead of doing `inherit (lib) <something>``, all inherits now use
`inherit (lib.<subsystem>) <something>`, which is much nicer.
2025-04-09 16:13:31 +02:00

65 lines
1.5 KiB
Nix

{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) str package;
cfg = config.modules.theming.gtk;
in {
options.modules.theming.gtk = {
enable = mkEnableOption "Wether to enable GTK theming";
theme = {
name = mkOption {
description = "The GTK theme name";
default = "Gruvbox-Dark-BL";
type = str;
};
package = mkOption {
description = "The GTK theme package";
default = pkgs.gruvbox-gtk-theme;
type = package;
};
};
iconTheme = {
description = "The GTK icon theme";
name = mkOption {
description = "The GTK icon theme name";
default = "Papirus-Dark";
type = str;
};
package = mkOption {
description = "The GTK icon theme package";
default = pkgs.papirus-icon-theme;
type = package;
};
};
};
config = mkIf cfg.enable {
# NOTE: we need this or gtk breaks
programs.dconf.enable = true;
environment = {
systemPackages = builtins.attrValues {
inherit
(pkgs)
gruvbox-gtk-theme
papirus-icon-theme
;
};
variables = let
cursorSize = 32;
in {
GTK_THEME = "Gruvbox-Dark";
XCURSOR_THEME = "BreezeX-RosePine-Linux";
XCURSOR_SIZE = cursorSize;
HYPRCURSOR_THEME = "BreezeX-RosePine-Linux";
HYPRCURSOR_SIZE = cursorSize;
};
};
};
}