Add before-source access key.txt provider

This commit is contained in:
2024-11-07 21:31:41 -06:00
parent e336fc67a1
commit 9ff4c03ab5

View File

@@ -61,9 +61,18 @@ install_inotify() {
fi 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_inotify
install_age install_age
install_cargo_binstall install_cargo_binstall
install_rbw install_rbw
rbw login rbw login
rbw sync rbw sync
provide_key_txt