I effectively cannot build any configuration when the build machine has /tmp mounted on a partition (or tmpfs in my case) when there isn't enough space for the build (which is a rather common occurrence lately). Same as with remote builds when the target machine is limited similarly.
The workaround for nixos-rebuild is to set $TMPDIR to somewhere with enough capacity for the build but this is not entirely respected by deploy as a part of the build does happen in whatever TMPDIR is set to but the "big" build still happens in /tmp either locally or on the remote machine, depending on remoteBuild.
Example error for a local build, TMPDIR set to /tmp2:
🚀 ℹ️ [deploy] [INFO] Building profile `system` for node `muffy`
error:
… writing file '/tmp/nix-build-etc-alsa-conf.d-49-pipewire-modules.conf.drv-0/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90'
error: writing to file: No space left on device
🚀 ❌ [deploy] [ERROR] Failed to push profile: Nix build command resulted in a bad exit code: Some(1)
For local builds, TMPDIR should imho be respected in all build phases. For remote builds see #282.
The only workaround that works for me (tm) is to remount /tmp to some place with enough capacity for the duration of the build, which is ... not optimal.
I effectively cannot build any configuration when the build machine has
/tmp
mounted on a partition (ortmpfs
in my case) when there isn't enough space for the build (which is a rather common occurrence lately). Same as with remote builds when the target machine is limited similarly.The workaround for
nixos-rebuild
is to set$TMPDIR
to somewhere with enough capacity for the build but this is not entirely respected bydeploy
as a part of the build does happen in whateverTMPDIR
is set to but the "big" build still happens in/tmp
either locally or on the remote machine, depending onremoteBuild
.Example error for a local build,
TMPDIR
set to/tmp2
:For local builds,
TMPDIR
should imho be respected in all build phases. For remote builds see #282.The only workaround that works for me (tm) is to remount
/tmp
to some place with enough capacity for the duration of the build, which is ... not optimal.