Merge pull request #16023 from choochootrain/add-xbanish-service

xbanish service: init at 1.4
This commit is contained in:
Luca Bruno 2016-06-13 17:24:44 +02:00 committed by GitHub
commit 02a1408d9c
2 changed files with 31 additions and 0 deletions

View File

@ -491,6 +491,7 @@
./services/x11/window-managers/windowlab.nix ./services/x11/window-managers/windowlab.nix
./services/x11/window-managers/wmii.nix ./services/x11/window-managers/wmii.nix
./services/x11/window-managers/xmonad.nix ./services/x11/window-managers/xmonad.nix
./services/x11/xbanish.nix
./services/x11/xfs.nix ./services/x11/xfs.nix
./services/x11/xserver.nix ./services/x11/xserver.nix
./system/activation/activation-script.nix ./system/activation/activation-script.nix

View File

@ -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";
};
};
}