Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$TMPDIR env var not entirely respected in local builds #283

Open
jficz opened this issue Jul 11, 2024 · 0 comments
Open

$TMPDIR env var not entirely respected in local builds #283

jficz opened this issue Jul 11, 2024 · 0 comments

Comments

@jficz
Copy link

jficz commented Jul 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant