2024-04-10 17:39:26 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
2024-04-29 23:01:08 +02:00
|
|
|
pkgs,
|
2024-04-10 17:39:26 +02:00
|
|
|
...
|
|
|
|
}: with lib; let
|
2024-04-12 22:03:29 +02:00
|
|
|
cfg = config.modules.themes.gtk;
|
|
|
|
username = config.modules.other.system.username;
|
2024-04-10 17:39:26 +02:00
|
|
|
hmCfg = config.home-manager.users.${username};
|
|
|
|
in {
|
2024-04-12 22:03:29 +02:00
|
|
|
options.modules.themes.gtk = {
|
2024-04-10 17:39:26 +02:00
|
|
|
enable = mkEnableOption "gtk theming";
|
|
|
|
name = mkOption {
|
|
|
|
description = "gtk theme name";
|
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
package = mkOption {
|
|
|
|
description = "gtk theme package";
|
|
|
|
type = types.package;
|
|
|
|
};
|
2024-04-29 23:01:08 +02:00
|
|
|
# iconTheme = mkOption {
|
|
|
|
# description = "gtk icon theme";
|
|
|
|
# type = with types; submodule {
|
|
|
|
# options = {
|
|
|
|
# name = mkOption {
|
|
|
|
# description = "gtk icon theme name";
|
|
|
|
# type = str;
|
|
|
|
# };
|
|
|
|
# package = mkOption {
|
|
|
|
# description = "gtk icon theme package";
|
|
|
|
# type = package;
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# };
|
2024-04-10 17:39:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home-manager.users.${username} = {
|
|
|
|
gtk = {
|
|
|
|
enable = true;
|
|
|
|
theme = {
|
2024-04-29 23:01:08 +02:00
|
|
|
# inherit (cfg) name package;
|
|
|
|
package = pkgs.materia-theme;
|
|
|
|
name = "Materia-dark";
|
2024-04-10 17:39:26 +02:00
|
|
|
};
|
2024-04-29 23:01:08 +02:00
|
|
|
# iconTheme = {
|
|
|
|
# inherit (cfg.iconTheme) name package;
|
|
|
|
# };
|
2024-04-10 17:39:26 +02:00
|
|
|
};
|
2024-04-29 23:01:08 +02:00
|
|
|
# home.sessionVariables = {
|
|
|
|
# GTK_THEME = cfg.name;
|
|
|
|
# GTK_USE_PORTAL = "1";
|
|
|
|
# };
|
2024-04-10 17:39:26 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|