diff --git a/home-manager/modules/fish.nix b/home-manager/modules/fish.nix index 8b57fa95..acbed7f9 100644 --- a/home-manager/modules/fish.nix +++ b/home-manager/modules/fish.nix @@ -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 {