2021-07-21 07:28:18 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.clipcat;
|
|
|
|
in {
|
|
|
|
|
|
|
|
options.services.clipcat= {
|
2024-04-21 15:54:59 +00:00
|
|
|
enable = mkEnableOption "Clipcat clipboard daemon";
|
2021-07-21 07:28:18 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
package = mkPackageOption pkgs "clipcat" { };
|
2021-07-21 07:28:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
systemd.user.services.clipcat = {
|
|
|
|
enable = true;
|
|
|
|
description = "clipcat daemon";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
after = [ "graphical-session.target" ];
|
|
|
|
serviceConfig.ExecStart = "${cfg.package}/bin/clipcatd --no-daemon";
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
};
|
|
|
|
}
|