1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-09 18:41:06 +01:00

cliphist: add extraOptions option

Add an extraOptions option that would be appended to the cliphist
command.
This commit is contained in:
Ryan 2024-05-05 15:37:54 +08:00 committed by GitHub
parent 2a44f4d09f
commit f69bf670d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 40 additions and 4 deletions

View file

@ -0,0 +1,24 @@
{ ... }: {
services.cliphist = {
enable = true;
allowImages = true;
extraOptions = [ "-max-dedupe-search" "10" "-max-items" "500" ];
};
test.stubs = {
cliphist = { };
wl-clipboard = { };
};
nmt.script = ''
servicePath=home-files/.config/systemd/user
assertFileExists $servicePath/cliphist.service
assertFileExists $servicePath/cliphist-images.service
assertFileRegex $servicePath/cliphist.service " '-max-dedupe-search' '10' "
assertFileRegex $servicePath/cliphist.service " '-max-items' '500' "
assertFileRegex $servicePath/cliphist-images.service " '-max-dedupe-search' '10' "
assertFileRegex $servicePath/cliphist-images.service " '-max-items' '500' "
'';
}

View file

@ -1 +1,4 @@
{ cliphist-sway-session-target = ./cliphist-sway-session-target.nix; }
{
cliphist-sway-session-target = ./cliphist-sway-session-target.nix;
cliphist-extra-options = ./cliphist-extra-options.nix;
}