From ac81e072cbc04395def2b1f3a07dc852d3effe04 Mon Sep 17 00:00:00 2001 From: repo-worker-tmp-code-b Date: Sun, 15 Nov 2026 22:37:50 -0600 Subject: [PATCH 1/2] nixos(locate): prune the generated fleet tree from updatedb (#10589) updatedb walked ~/git/fleet/watcher-bench-195/fixtures/manydirs, exhausted its fd limit, exited 1, and the failed unit made a healthy nixos-rebuild switch report status 4. The fleet tree is generated worktrees and bench corpora with no locate value, so add it to services.locate.prunePaths instead of indexing it. LimitNOFILE is already 524288 on amd; pruning removes the scanner's blowup rather than raising the ceiling again. Validated: nix-instantiate --parse and nixfmt --check on the module. --- nixos/services/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/services/default.nix b/nixos/services/default.nix index 7cdcb0c6ba..8b9ac5c216 100644 --- a/nixos/services/default.nix +++ b/nixos/services/default.nix @@ -90,6 +90,13 @@ enable = true; package = pkgs.plocate; interval = "hourly"; + # Generated fleet trees (git worktrees and the watcher-bench fixture + # corpora, e.g. watcher-bench-195/fixtures/manydirs) have no locate + # value and are enormous: updatedb exhausted its 131072 fd limit + # scanning manydirs, exited 1, and the coincidentally-failed unit + # made an otherwise-healthy `nixos-rebuild switch` report failure + # (#10589). Prune them instead of indexing them. + prunePaths = [ "/home/user/git/fleet" ]; #localuser = null; }; displayManager = { From 2323c3693534ff4580411248f0f04160a80b610c Mon Sep 17 00:00:00 2001 From: repo-worker-tmp-code-b Date: Sun, 15 Nov 2026 22:40:26 -0600 Subject: [PATCH 2/2] nixos(locate): keep the stock prunePaths alongside the fleet entry Setting services.locate.prunePaths replaces the option default rather than appending to it, so the first cut dropped /tmp, /var/cache, /nix/store and the other stock prunes. Restate the default list with the fleet tree appended, verified by evaluating config.environment.etc."updatedb.conf".text. --- nixos/services/default.nix | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/nixos/services/default.nix b/nixos/services/default.nix index 8b9ac5c216..2b619bd733 100644 --- a/nixos/services/default.nix +++ b/nixos/services/default.nix @@ -90,13 +90,24 @@ enable = true; package = pkgs.plocate; interval = "hourly"; - # Generated fleet trees (git worktrees and the watcher-bench fixture - # corpora, e.g. watcher-bench-195/fixtures/manydirs) have no locate - # value and are enormous: updatedb exhausted its 131072 fd limit - # scanning manydirs, exited 1, and the coincidentally-failed unit - # made an otherwise-healthy `nixos-rebuild switch` report failure - # (#10589). Prune them instead of indexing them. - prunePaths = [ "/home/user/git/fleet" ]; + # Restates the option default (nixos/modules/misc/locate.nix) because + # assigning prunePaths replaces it, and adds the generated fleet tree: + # git worktrees and the watcher-bench fixture corpora (e.g. + # watcher-bench-195/fixtures/manydirs) have no locate value and are + # enormous. updatedb exhausted its fd limit scanning manydirs, exited + # 1, and the coincidentally-failed unit made an otherwise-healthy + # `nixos-rebuild switch` report failure (#10589). Prune it instead. + prunePaths = [ + "/tmp" + "/var/tmp" + "/var/cache" + "/var/lock" + "/var/run" + "/var/spool" + "/nix/store" + "/nix/var/log/nix" + "/home/user/git/fleet" + ]; #localuser = null; }; displayManager = {