mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 23:11:34 +01:00
31 lines
694 B
Nix
31 lines
694 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
options.custom.services.cliphist.enable = lib.mkEnableOption "";
|
|
|
|
config = lib.mkIf config.custom.services.cliphist.enable {
|
|
assertions = [
|
|
{
|
|
assertion = config.custom.programs.rofi.enable;
|
|
message = "cliphist requires rofi";
|
|
}
|
|
];
|
|
|
|
services.cliphist = {
|
|
enable = true;
|
|
allowImages = false;
|
|
};
|
|
|
|
systemd.user.services.cliphist.Service.ExecStopPost =
|
|
"${lib.getExe config.services.cliphist.package} wipe";
|
|
|
|
home.packages = [
|
|
pkgs.wl-clipboard
|
|
(pkgs.writeScriptBin "rofi-clipboard" "cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy")
|
|
];
|
|
};
|
|
}
|