From 0acf41bf12fa2f0ecfb034f7643aff6b69fa2bfb Mon Sep 17 00:00:00 2001 From: Justin Garrison Date: Wed, 7 Oct 2026 20:57:57 -0700 Subject: [PATCH] cap davfs cache, skip nautilus thumbs on remote --- hosts/x-home.nix | 21 +++++++++++++++++++++ hosts/x.nix | 8 ++++++++ 2 files changed, 29 insertions(+) diff --git a/hosts/x-home.nix b/hosts/x-home.nix index 17f835d..42dd68f 100644 --- a/hosts/x-home.nix +++ b/hosts/x-home.nix @@ -72,6 +72,27 @@ in command = "nautilus --new-window /home/jgarr/downloads"; name = "Open Downloads in Nautilus"; }; + + # Keep Nautilus from thumbnailing files on the davfs2-backed Taildrive + # mount at /mnt/s/home. davfs2 downloads whole files to open them (WebDAV + # has no range-read / streaming semantics), so a single video thumbnail + # pulls the entire file through the network. "local-only" means Nautilus + # only generates thumbnails on local filesystems. + "org/gnome/nautilus/preferences" = { + show-image-thumbnails = "local-only"; + # Also skip the directory-size counter on remote mounts for the same + # reason — otherwise Nautilus stat()s every file in the subtree. + show-directory-item-counts = "local-only"; + }; + + # Belt and suspenders: exclude /mnt from the Tracker file-indexing miner + # so background indexing doesn't walk mounted shares. + "org/freedesktop/tracker3/miner/files" = { + ignored-directories = [ + "po" "CVS" "core-dumps" "lost+found" + "/mnt" + ]; + }; }; xdg.configFile."ghostty/config".text = '' diff --git a/hosts/x.nix b/hosts/x.nix index 09c2f97..6ea9f78 100644 --- a/hosts/x.nix +++ b/hosts/x.nix @@ -67,6 +67,11 @@ in settings.globalSection = { use_locks = false; ask_auth = false; + # Cap cache at 200MB (default is 50MB but davfs2 can balloon well past + # it in practice when something like Nautilus walks the tree). This is + # the hard ceiling — davfs2 evicts the least-recently-used entries once + # the cache dir exceeds it. + cache_size = 200; }; }; environment.etc."davfs2/secrets" = { @@ -74,6 +79,9 @@ in text = "/mnt/s/home guest guest\n"; }; systemd.mounts = [{ + # davfs2 1.7.3 can't match hrefs when the request URL is percent-encoded, + # so `@` must be left literal (not %40) — the server returns `@` in + # and davfs2 rejects responses whose paths don't match the request. what = "http://100.100.100.100:8080/justinleegarrison@gmail.com/s/home/"; where = "/mnt/s/home"; type = "davfs"; -- 2.51.2