@@ -0,0 +1,31 @@
1+{ config, lib, pkgs, ... }:
2+
3+with lib;
4+
5+let
6+ cfg = config.services.clipmenu;
7+in {
8+
9+ options.services.clipmenu = {
10+ enable = mkEnableOption "clipmenu, the clipboard management daemon";
11+
12+ package = mkOption {
13+ type = types.package;
14+ default = pkgs.clipmenu;
15+ defaultText = "pkgs.clipmenu";
16+ description = "clipmenu derivation to use.";
17+ };
18+ };
19+
20+ config = mkIf cfg.enable {
21+ systemd.user.services.clipmenu = {
22+ enable = true;
23+ description = "Clipboard management daemon";
24+ wantedBy = [ "graphical-session.target" ];
25+ after = [ "graphical-session.target" ];
26+ serviceConfig.ExecStart = "${cfg.package}/bin/clipmenud";
27+ };
28+
29+ environment.systemPackages = [ cfg.package ];
30+ };
31+}