2023-10-13 21:04:24 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: with lib; let
|
|
|
|
cfg = config.myOptions.themes.cursor;
|
2024-04-14 18:49:29 +02:00
|
|
|
inherit (config.myOptions.other.system) username;
|
2023-10-13 21:04:24 +02:00
|
|
|
in {
|
|
|
|
options.myOptions.themes.cursor = {
|
2024-04-05 22:59:32 +02:00
|
|
|
enable = mkEnableOption "cursor theming";
|
2023-10-13 21:04:24 +02:00
|
|
|
package = mkOption {
|
|
|
|
description = "cursor theme package";
|
|
|
|
type = types.package;
|
|
|
|
};
|
|
|
|
name = mkOption {
|
|
|
|
description = "cursor theme name";
|
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
size = mkOption {
|
|
|
|
description = "cursor size";
|
|
|
|
type = types.int;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-02-14 15:53:32 +01:00
|
|
|
environment.sessionVariables = {
|
|
|
|
XCURSOR_THEME = "${cfg.name}";
|
2024-02-14 23:42:58 +01:00
|
|
|
XCURSOR_SIZE = "${toString cfg.size}";
|
2024-02-14 15:53:32 +01:00
|
|
|
};
|
|
|
|
|
2024-02-29 00:29:56 +01:00
|
|
|
home-manager.users.${username} = {
|
2023-10-13 21:04:24 +02:00
|
|
|
home.pointerCursor = {
|
|
|
|
inherit (cfg) package name size;
|
|
|
|
gtk.enable = true;
|
|
|
|
x11.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|