From d20643fbbd0e1b6883a87c54da6cbee7623840d4 Mon Sep 17 00:00:00 2001 From: Asep Haryana Date: Mon, 3 Aug 2026 04:33:46 +0700 Subject: [PATCH] fix(infra): ship next.config.ts into Nix store for hub next start re-reads next.config.ts at runtime; the OLD store had only .next/public/package.json/node_modules, so images.maximumDiskCacheSize fell back to defaults (undefined) and the image-optimizer disk LRU did mkdir(/.next/cache/images) -> EACCES on every optimized image. Also now that next.config.ts sets maximumDiskCacheSize:0 + isrFlushToDisk:false, shipping the file makes runtime match the baked build config, eliminating the EACCES spike. --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index f1cdc9b..275233f 100644 --- a/flake.nix +++ b/flake.nix @@ -88,6 +88,7 @@ cp -r .next $out/share/hub/ cp -r public $out/share/hub/ 2>/dev/null || true cp package.json $out/share/hub/ + cp next.config.{ts,mjs,js} $out/share/hub/ 2>/dev/null || true cp -r node_modules $out/share/hub/ cat > $out/bin/hub << WRAPPER #!${pkgs.runtimeShell}