summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/dotfiles15
1 files changed, 15 insertions, 0 deletions
diff --git a/.local/bin/dotfiles b/.local/bin/dotfiles
index e7a581a..2e31e57 100755
--- a/.local/bin/dotfiles
+++ b/.local/bin/dotfiles
@@ -105,6 +105,20 @@ reinstall_nvim() {
fi
}
+sync_secret_service() {
+ local secret_service_file=/usr/share/dbus-1/services/org.freedesktop.secrets.service
+ local secret_service_owner
+ secret_service_owner=$(! pacman --query --owns --quiet "$secret_service_file" 2>/dev/null)
+ if [[ -n $secret_service_owner && $secret_service_owner != "pass-secret-service" ]]; then
+ echo -e "$secret_service_owner owns $secret_service_file (should be pass-secret-service)" \
+ "\nPlease uninstall $secret_service_owner, sync, then log back in" >&2
+ exit 1
+ fi
+ # shellcheck disable=SC2034
+ local deps=(pass-secret-service-bin)
+ sync_packages yay deps
+}
+
# python-proton-keyring-linux (a dependency of proton-vpn-…) has gnome-keyring
# as a hard dependency even though one can actually use any provider of
# org.freedesktop.secrets (like pass-secret-service in this project).
@@ -152,6 +166,7 @@ sync)
# shellcheck disable=SC2034
declare aur_deps=(pass-secret-service-bin vim-language-server)
sync_packages yay aur_deps
+ sync_secret_service
sync_proton_vpn
sync_nvim
sync_mdformat