diff options
author | Luca Bruno <lucabru@src.gnome.org> | 2016-06-13 17:24:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-13 17:24:44 +0200 |
commit | 02a1408d9cecb80672aa4a8a14071ea36235e3a3 (patch) | |
tree | 2fd26a5129fd5c9d36df21079bd4c5930f6d7ce7 /nixos/modules | |
parent | 127b4e84f0c8806d57f8dce406a09000d90260e4 (diff) | |
parent | 3913aaeaadc75d6beeb632abefc1e39608968fec (diff) |
Merge pull request #16023 from choochootrain/add-xbanish-service
xbanish service: init at 1.4
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/x11/xbanish.nix | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 7d93801dbe1f2..db159366c4e73 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -491,6 +491,7 @@ ./services/x11/window-managers/windowlab.nix ./services/x11/window-managers/wmii.nix ./services/x11/window-managers/xmonad.nix + ./services/x11/xbanish.nix ./services/x11/xfs.nix ./services/x11/xserver.nix ./system/activation/activation-script.nix diff --git a/nixos/modules/services/x11/xbanish.nix b/nixos/modules/services/x11/xbanish.nix new file mode 100644 index 0000000000000..e1e3cbc8e4412 --- /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"; + }; + }; +} |