nixos-config/modules/home/services/cliphist.nix
SebastianStork 70b8d89311
Revert "home-manager: Use minimal module set and import everything else manually"
This reverts commit 0c25e7fd34.

The slightly decreased evaluation time isn't worth the added maintenance burden
2026-02-19 18:37:58 +01:00

29 lines
687 B
Nix

{
config,
pkgs,
lib,
...
}:
{
options.custom.services.cliphist.enable = lib.mkEnableOption "";
config = lib.mkIf config.custom.services.cliphist.enable {
assertions = lib.singleton {
assertion = config.custom.programs.rofi.enable;
message = "Cliphist requires Rofi";
};
services.cliphist = {
enable = true;
extraOptions = [ ];
};
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")
];
};
}