home-manager: add fzf-passage

This commit is contained in:
leo 2023-06-06 15:23:47 +02:00
parent 3d7b7f0923
commit 46f25dcda0
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -225,6 +225,18 @@ in {
'';
};
".local/bin/fuzzypassage" = {
executable = true;
text = ''
PREFIX="''${PASSAGE_DIR:-$HOME/.passage/store}"
FZF_DEFAULT_OPTS=""
name="$(find "$PREFIX" -type f -name '*.age' | \
sed -e "s|$PREFIX/||" -e 's|\.age$||' | \
fzf --height 40% --reverse --no-multi)"
passage "''${@}" "$name"
'';
};
".local/bin/battery.sh" = {
source = bin/battery.sh;
executable = true;