[Nix-dev] nixos-rebuild using $TMPDIR

Joachim Schiele js at lastlog.de
Wed Dec 14 18:37:03 CET 2016


On 13.12.2016 16:14, Azul wrote:
> Hey gang,
> 
> Trying to do a nixos-rebuild where I added libreoffice to my list of
> packages failing due to lack of disk space.
> My /tmp is on tmpfs, so limited in disk space.
> 
> I tried to set NIX_REMOTE="" and TMPDIR=/var/tmp/ but no joy,
> nixos-rebuild just tells me to sod off and does its own thing.
> 
> is there a way to tell nixos-rebuild to use my TMPDIR settings ?
> 
> azul


man nix-build

lets to:

       TMPDIR
           Use the specified directory to store temporary files. In
particular, this includes temporary build directories; these can take up
substantial amounts of disk space. The default is /tmp.

so:

TMPDIR=/foo nix-build -A whatever

should do the trick


More information about the nix-dev mailing list