main
 1{lib, ...}: {
 2  den.aspects.desktop.style.cursor = {
 3    settings = {
 4      name = lib.mkOption {
 5        type = lib.types.str;
 6        default = "Bibata-Modern-Classic";
 7      };
 8      package = lib.mkOption {
 9        type = lib.types.functionTo lib.types.package;
10        default = pkgs: pkgs.bibata-cursors;
11      };
12      size = lib.mkOption {
13        type = lib.types.ints.positive;
14        default = 24;
15      };
16    };
17
18    nixos = {host, ...}: {
19      environment.variables.XCURSOR_SIZE = toString host.settings.desktop.style.cursor.size;
20    };
21
22    homeManager = {
23      host,
24      pkgs,
25      ...
26    }: let
27      cfg = host.settings.desktop.style.cursor;
28    in {
29      home.pointerCursor = {
30        enable = true;
31
32        inherit (cfg) name;
33        package = cfg.package pkgs;
34        size = builtins.floor (cfg.size + 0.5);
35        x11.enable = true;
36        gtk.enable = true;
37      };
38    };
39  };
40}