xbanish service: init at 1.4

+31
+1
nixos/modules/module-list.nix
··· 490 490 ./services/x11/window-managers/windowlab.nix 491 491 ./services/x11/window-managers/wmii.nix 492 492 ./services/x11/window-managers/xmonad.nix 493 + ./services/x11/xbanish.nix 493 494 ./services/x11/xfs.nix 494 495 ./services/x11/xserver.nix 495 496 ./system/activation/activation-script.nix
+30
nixos/modules/services/x11/xbanish.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let cfg = config.services.xbanish; 6 + 7 + in { 8 + options.services.xbanish = { 9 + 10 + enable = mkEnableOption "xbanish"; 11 + 12 + arguments = mkOption { 13 + description = "Arguments to pass to xbanish command"; 14 + default = ""; 15 + example = "-d -i shift"; 16 + type = types.str; 17 + }; 18 + }; 19 + 20 + config = mkIf cfg.enable { 21 + systemd.user.services.xbanish = { 22 + description = "xbanish hides the mouse pointer"; 23 + wantedBy = [ "default.target" ]; 24 + serviceConfig.ExecStart = '' 25 + ${pkgs.xbanish}/bin/xbanish ${cfg.arguments} 26 + ''; 27 + serviceConfig.Restart = "always"; 28 + }; 29 + }; 30 + }