summary refs log tree commit diff
path: root/nixos/modules/services/x11/xbanish.nix
diff options
context:
space:
mode:
authorHurshal Patel <hurshal@imap.cc>2016-04-19 23:24:53 -0700
committerHurshal Patel <hurshal@imap.cc>2016-06-07 23:58:06 -0700
commit3913aaeaadc75d6beeb632abefc1e39608968fec (patch)
tree0db46e166b380e8d4a68b280464e35cf5adfa657 /nixos/modules/services/x11/xbanish.nix
parent55028d556ffe1b08b6ced55b514f8506188fdb6d (diff)
downloadnixpkgs-3913aaeaadc75d6beeb632abefc1e39608968fec.tar
nixpkgs-3913aaeaadc75d6beeb632abefc1e39608968fec.tar.gz
nixpkgs-3913aaeaadc75d6beeb632abefc1e39608968fec.tar.bz2
nixpkgs-3913aaeaadc75d6beeb632abefc1e39608968fec.tar.lz
nixpkgs-3913aaeaadc75d6beeb632abefc1e39608968fec.tar.xz
nixpkgs-3913aaeaadc75d6beeb632abefc1e39608968fec.tar.zst
nixpkgs-3913aaeaadc75d6beeb632abefc1e39608968fec.zip
xbanish service: init at 1.4
Diffstat (limited to 'nixos/modules/services/x11/xbanish.nix')
-rw-r--r--nixos/modules/services/x11/xbanish.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/xbanish.nix b/nixos/modules/services/x11/xbanish.nix
new file mode 100644
index 00000000000..e1e3cbc8e44
--- /dev/null
+++ b/nixos/modules/services/x11/xbanish.nix
@@ -0,0 +1,30 @@
+{ 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 = [ "default.target" ];
+      serviceConfig.ExecStart = ''
+        ${pkgs.xbanish}/bin/xbanish ${cfg.arguments}
+      '';
+      serviceConfig.Restart = "always";
+    };
+  };
+}