{ 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" ]; }; }; }; }