From 9ff4c03ab59e2ac7b9d38dfd07a884e120aa4de0 Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 7 Nov 2024 21:31:41 -0600 Subject: [PATCH] Add before-source access key.txt provider --- home/.before-source-state.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/home/.before-source-state.sh b/home/.before-source-state.sh index b112361..1aa5925 100755 --- a/home/.before-source-state.sh +++ b/home/.before-source-state.sh @@ -61,9 +61,18 @@ install_inotify() { fi } +# While key.txt is managed by Chezmoi, it's required for encrypted operations and needed to bootstrap other operations. +provide_key_txt() { + if [ ! -f "~/key.txt" ]; then + rbw get "key.txt (age)" --field notes >~/key.txt + rbw get "key.txt (age)" --field password >~/key.txt + fi +} + install_inotify install_age install_cargo_binstall install_rbw rbw login rbw sync +provide_key_txt