2017-12-05 23:23:31 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.parcellite;
|
|
|
|
package = pkgs.parcellite;
|
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
in {
|
2017-12-05 23:23:31 +01:00
|
|
|
meta.maintainers = [ maintainers.gleber ];
|
|
|
|
|
|
|
|
options = {
|
2020-02-02 00:39:17 +01:00
|
|
|
services.parcellite = { enable = mkEnableOption "Parcellite"; };
|
2017-12-05 23:23:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.packages = [ package ];
|
|
|
|
|
|
|
|
systemd.user.services.parcellite = {
|
|
|
|
Unit = {
|
|
|
|
Description = "Lightweight GTK+ clipboard manager";
|
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
2017-12-05 23:23:31 +01:00
|
|
|
|
|
|
|
Service = {
|
|
|
|
ExecStart = "${package}/bin/parcellite";
|
|
|
|
Restart = "on-abort";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|