2023-10-13 21:04:24 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2024-05-05 12:38:40 +02:00
|
|
|
}: let
|
2024-07-15 23:18:25 +02:00
|
|
|
cfg = config.poz.themes.cursor;
|
|
|
|
inherit (config.poz.other.system) username;
|
2024-05-05 12:38:40 +02:00
|
|
|
|
2024-07-25 11:45:44 +02:00
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
inherit (lib.options) mkEnableOption mkOption;
|
2024-05-05 12:38:40 +02:00
|
|
|
inherit (lib.types) int package str;
|
2023-10-13 21:04:24 +02:00
|
|
|
in {
|
2024-07-15 23:18:25 +02:00
|
|
|
options.poz.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";
|
2024-05-05 12:38:40 +02:00
|
|
|
type = package;
|
2023-10-13 21:04:24 +02:00
|
|
|
};
|
|
|
|
name = mkOption {
|
|
|
|
description = "cursor theme name";
|
2024-05-05 12:38:40 +02:00
|
|
|
type = str;
|
2023-10-13 21:04:24 +02:00
|
|
|
};
|
|
|
|
size = mkOption {
|
|
|
|
description = "cursor size";
|
2024-05-05 12:38:40 +02:00
|
|
|
type = int;
|
2023-10-13 21:04:24 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|