From 519d97cb75e7781b8ccd72c2bd0689845757412f Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Sun, 29 Sep 2024 16:07:51 -0700 Subject: [PATCH] Add .chezmoiscripts/10-unlock-bw.sh Update .config/packages/archgirlie --- .chezmoiscripts/run_before_10-unlock-bw.sh.tmpl | 13 +++++++++++++ dot_config/packages/archgirlie | 1 - 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .chezmoiscripts/run_before_10-unlock-bw.sh.tmpl diff --git a/.chezmoiscripts/run_before_10-unlock-bw.sh.tmpl b/.chezmoiscripts/run_before_10-unlock-bw.sh.tmpl new file mode 100644 index 0000000..8d9f9eb --- /dev/null +++ b/.chezmoiscripts/run_before_10-unlock-bw.sh.tmpl @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +type bw >/dev/null 2>&1 || exit + +pass={{ joinPath .chezmoi.sourceDir ".bw-password.asc" | include | decrypt }} + +if ! bw login --check; then + BW_SESSION=$(bw login "bitwarden@punkfairie.net" "$pass" --raw) +else + BW_SESSION=$(bw unlock "$pass" --raw) +fi + +export BW_SESSION diff --git a/dot_config/packages/archgirlie b/dot_config/packages/archgirlie index c7b37e9..2af459a 100644 --- a/dot_config/packages/archgirlie +++ b/dot_config/packages/archgirlie @@ -1,4 +1,3 @@ - -> Avoid running yay as root/sudo. aic94xx-firmware alsa-utils amfora