Add fzf-pass custom util

This commit is contained in:
Andrea Ciceri 2024-09-26 22:18:45 +02:00
parent 7d3c774e4e
commit ad844d9266
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg

View file

@ -3,6 +3,14 @@
username,
...
}:
let
fzfpass = pkgs.writeShellApplication {
name = "fzfpass";
text = ''
find "$PASSWORD_STORE_DIR" -name "*.gpg" | sed "s|$PASSWORD_STORE_DIR/||; s|\.gpg||" | fzf --border --info=inline | xargs pass "$@"
'';
};
in
{
programs.password-store = {
enable = true;
@ -11,4 +19,5 @@
};
package = pkgs.pass.withExtensions (e: [ e.pass-otp ]);
};
home.packages = [ fzfpass ];
}