mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
Merge pull request #16023 from choochootrain/add-xbanish-service
xbanish service: init at 1.4
This commit is contained in:
commit
02a1408d9c
@ -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
|
||||||
|
30
nixos/modules/services/x11/xbanish.nix
Normal file
30
nixos/modules/services/x11/xbanish.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user