From dcf79577ca1fccafd784e0045fee8fc746b2d9b7 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Tue, 18 Aug 2026 23:17:21 +0100 Subject: [PATCH] nixos/git: Buffer uploads on the state volume Gitea writes uploaded release assets to a temp file before storing them. That landed in `/tmp`, which is on the 2G tmpfs root, so uploading the installer ISO failed with: ParseMultipartForm [E] ... write /tmp/multipart-...: no space left on device Point the service's `TMPDIR` at the state volume, which has room. Co-Authored-By: Claude Opus 5 --- nixos/boxes/colony/vms/git/gitea.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nixos/boxes/colony/vms/git/gitea.nix b/nixos/boxes/colony/vms/git/gitea.nix index 1a932b2..9f23846 100644 --- a/nixos/boxes/colony/vms/git/gitea.nix +++ b/nixos/boxes/colony/vms/git/gitea.nix @@ -43,9 +43,19 @@ in (umask 027; gitea_extra_setup) ''; + + # Uploaded release assets are buffered through a temp file before being stored. + # The default /tmp is on the small tmpfs root, so keep them on the state volume. + environment.TMPDIR = "${config.services.gitea.stateDir}/tmp"; } ]; }; + + tmpfiles.settings."10-gitea-tmp"."${config.services.gitea.stateDir}/tmp".d = { + user = config.services.gitea.user; + group = config.services.gitea.group; + mode = "0700"; + }; }; services = {