File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6868 ] ;
6969 } ;
7070
71+ # Keep the assistant's Obsidian vault connected to Obsidian Sync. The auth,
72+ # sync setup, and vault data are runtime state under the backed-up assistant
73+ # home; this service only starts once backup restore has completed.
74+ s6 . services . assistant-obsidian-sync = {
75+ dependencies = [
76+ "base"
77+ "backup-restore"
78+ ] ;
79+ run = ''
80+ vault=/var/lib/assistant/Vault
81+ if [ ! -d "$vault/.obsidian" ]; then
82+ echo "assistant-obsidian-sync: $vault is not configured yet; run ob login + ob sync-setup once. Retrying." >&2
83+ sleep 30
84+ exit 1
85+ fi
86+ exec /command/s6-setuidgid assistant \
87+ env \
88+ HOME=/var/lib/assistant \
89+ USER=assistant \
90+ SHELL=/bin/sh \
91+ PATH=/etc/profiles/per-user/assistant/bin:/nix/var/nix/profiles/default/bin:/bin:/sbin:/usr/bin \
92+ SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt \
93+ NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt \
94+ NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-bundle.crt \
95+ ${ obsidian-headless } /bin/ob sync --path "$vault" --continuous
96+ '' ;
97+ } ;
98+
7199 # Telegram bridge for pi, via pilegram (the flake input above). Long-polling
72100 # needs only outbound HTTPS, so nothing is exposed on the tailnet or the image.
73101 # pilegram reads pi's provider keys from ~/.pi and keeps its own state under
You can’t perform that action at this time.
0 commit comments