2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.services.clipmenu;
|
|
|
|
in {
|
|
|
|
|
|
|
|
options.services.clipmenu = {
|
2024-09-19 14:19:46 +00:00
|
|
|
enable = lib.mkEnableOption "clipmenu, the clipboard management daemon";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
package = lib.mkPackageOption pkgs "clipmenu" { };
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2020-04-24 23:36:52 +00:00
|
|
|
systemd.user.services.clipmenu = {
|
|
|
|
enable = true;
|
|
|
|
description = "Clipboard management daemon";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
after = [ "graphical-session.target" ];
|
|
|
|
serviceConfig.ExecStart = "${cfg.package}/bin/clipmenud";
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
};
|
|
|
|
}
|