diff options
Diffstat (limited to 'nixpkgs/nixos/modules/services/x11/xbanish.nix')
-rw-r--r-- | nixpkgs/nixos/modules/services/x11/xbanish.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/services/x11/xbanish.nix b/nixpkgs/nixos/modules/services/x11/xbanish.nix new file mode 100644 index 000000000000..b95fac68f165 --- /dev/null +++ b/nixpkgs/nixos/modules/services/x11/xbanish.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let cfg = config.services.xbanish; + +in { + options.services.xbanish = { + + enable = mkEnableOption "xbanish"; + + arguments = mkOption { + description = "Arguments to pass to xbanish command"; + default = ""; + example = "-d -i shift"; + type = types.str; + }; + }; + + config = mkIf cfg.enable { + systemd.user.services.xbanish = { + description = "xbanish hides the mouse pointer"; + wantedBy = [ "graphical-session.target" ]; + partOf = [ "graphical-session.target" ]; + serviceConfig.ExecStart = '' + ${pkgs.xbanish}/bin/xbanish ${cfg.arguments} + ''; + serviceConfig.Restart = "always"; + }; + }; +} |