nixos-config/home-manager/modules/xbanish/default.nix
Erwin Boskma 4cd0f83ce8
Some checks failed
/ check (push) Failing after 2m46s
Run nixfmt
2024-02-05 11:46:52 +01:00

42 lines
798 B
Nix

{
pkgs,
config,
lib,
...
}:
with lib;
let
cfg = config.eboskma.services.xbanish;
in
{
options.eboskma.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 = {
Unit = {
Description = "xbanish hides the mouse pointer when typing";
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart = ''
${pkgs.xbanish}/bin/xbanish ${cfg.arguments}
'';
Restart = "always";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
}