1{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7
8with lib;
9
10let
11 cfg = config.services.xbanish;
12
13in
14{
15 options.services.xbanish = {
16
17 enable = mkEnableOption "xbanish";
18
19 arguments = mkOption {
20 description = "Arguments to pass to xbanish command";
21 default = "";
22 example = "-d -i shift";
23 type = types.str;
24 };
25 };
26
27 config = mkIf cfg.enable {
28 systemd.user.services.xbanish = {
29 description = "xbanish hides the mouse pointer";
30 wantedBy = [ "graphical-session.target" ];
31 partOf = [ "graphical-session.target" ];
32 serviceConfig.ExecStart = ''
33 ${pkgs.xbanish}/bin/xbanish ${cfg.arguments}
34 '';
35 serviceConfig.Restart = "always";
36 };
37 };
38}