This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / tools / passmenu.nix
965 B 37 lines
1{ self, ... }: 2{ 3 perSystem = 4 { pkgs, ... }: 5 { 6 packages.passmenu = pkgs.writeShellApplication { 7 name = "passmenu"; 8 runtimeInputs = [ 9 self.packages.${pkgs.system}.menu 10 ]; 11 text = '' 12 set -eu 13 shopt -s nullglob globstar 14 15 # typeit=0 16 # if [[ $1 == "--type" ]]; then 17 # typeit=1 18 # shift 19 # fi 20 21 prefix=''${PASSWORD_STORE_DIR-~/.password-store} 22 password_files=( "$prefix"/**/*.gpg ) 23 password_files=( "''${password_files[@]#"$prefix"/}" ) 24 password_files=( "''${password_files[@]%.gpg}" ) 25 26 password=$(printf '%s\n' "''${password_files[@]}" | menu "$@") 27 28 filename=$(basename "$password") 29 if [[ "$filename" == "otp" ]]; then 30 pass otp -c "$password" 2>/dev/null 31 else 32 pass show -c "$password" 2>/dev/null 33 fi 34 ''; 35 }; 36 }; 37}