Nextcloud sync, also zapzap

This commit is contained in:
2026-10-11 09:22:42 +03:00
parent 0ea6d168fd
commit 04427ddcda
5 changed files with 85 additions and 13 deletions
+5 -5
View File
@@ -29,10 +29,10 @@
};
# mbsync's PassCmd shells out to `pass`, which needs the GPG smartcard to
# decrypt. On a timer, a missing card would otherwise surface as a
# pinentry "please insert card" prompt every run. `gpg --card-status`
# only queries the card reader (no pinentry involved either way), so it's
# safe to use as a silent presence check: skip the sync entirely when the
# card isn't there, instead of letting mbsync hit that prompt.
# pinentry "please insert card" prompt every run. azos-card-present is a
# silent presence check (see overlays/default.nix): skip the sync
# entirely when the card isn't there, instead of letting mbsync hit that
# prompt.
#
# New mail is detected by counting files under every account's Maildir
# "new" subdirectory before and after the sync -- that's where messages
@@ -42,7 +42,7 @@
# notify-send -- intentionally separate from mu4e's own "mbsync -a" (its
# mu4e-get-mail-command), which doesn't go through this script at all.
mbsyncSafe = pkgs.writeShellScript "mbsync-safe" ''
if ! ${pkgs.gnupg}/bin/gpg --card-status >/dev/null 2>&1; then
if ! ${pkgs.azos-card-present}/bin/azos-card-present; then
exit 0
fi
before=$(find "$HOME/Maildir" -path '*/new/*' -type f 2>/dev/null | wc -l)