{ 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; }; }; }