Skip to content

Commit

Permalink
fix(fish): Fallback to manual input if system password can't be pulle…
Browse files Browse the repository at this point in the history
…d from 1Password
  • Loading branch information
mrjones2014 committed Dec 15, 2023
1 parent f7119b3 commit d610251
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion home-manager/modules/fish.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ let
#!${pkgs.bash}/bin/bash
# TODO figure out a way to do this without silently depending on `op` being on $PATH
# using `$\{pkgs._1password}/bin/op` results in unable to connect to desktop app
op item get "System Password" --fields password
PASSWORD="$(op item get "System Password" --fields password)"
if [[ -z "$PASSWORD" ]]; then
echo "Failed to get password from 1Password."
read -s -p "Password: " PASSWORD
fi
echo $PASSWORD
'';
op-shell-plugins = [ "gh" ];
in {
Expand Down

0 comments on commit d610251

Please sign in to comment.