nixos-config/home-manager/modules/xbanish/default.nix

43 lines
798 B
Nix
Raw Normal View History

2024-02-05 11:46:52 +01:00
{
pkgs,
config,
lib,
...
}:
2022-11-11 11:54:21 +01:00
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 {
2022-11-11 11:54:21 +01:00
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" ];
};
};
};
}