nix-dotfiles/modules/desktop/clipse.nix
2024-12-15 01:40:00 -08:00

36 lines
845 B
Nix

{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.clipse;
in {
options.modules.desktop.clipse = {
enable = mkEnableOption "Enable clipse, a generic clipboard manager";
package = mkOption {
type = types.package;
default = pkgs.clipse;
example = "pkgs.clipse";
};
};
config = mkIf cfg.enable {
hm.systemd.user.services.clipse = {
Unit = {
Description = "clipse, a generic clipboard manager";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${lib.getExe cfg.package} --listen-shell";
Restart = "on-failure";
RestartSec = 5;
};
};
};
}