summaryrefslogtreecommitdiff
path: root/hm/env/cursor.nix
blob: 49e8313968a15c8fd660078bd063caa8faaa4ba3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ config, lib, pkgs, ... }:
let
  cfg = config.hm.env.cursor;
  
  miyabi-cursor-pkg = pkgs.runCommand "miyabi" {} ''
    mkdir -p $out/share/icons/miyabi
    cp -rv ${../../resources/cursors/miyabi}/* $out/share/icons/miyabi/
  '';
in
{
  options.hm.env.cursor = {
    enableMiyabi = lib.mkEnableOption "Enables the Miyabi cursor";
    
    size = lib.mkOption {
      type = lib.types.int;
      default = 24;
      description = "The size of the mouse cursor";
    };
  };

  config = lib.mkIf cfg.enableMiyabi {
    home.pointerCursor = {
      gtk.enable = true;
      x11.enable = true;
      package = miyabi-cursor-pkg; 
      name = "miyabi";
      size = cfg.size;
    };
  };
}