nixos/nixos-installer: use temporary directory on target filesystem

nix build should store it's temporary files on target filesystem.
This should fix 'No space left on device' on systems
with low amount of RAM when there is a need to build something
like Linux kernel
wip/yesman
misuzu 4 years ago
parent 93aabab760
commit 5700232c3f
  1. 5
      nixos/modules/installer/tools/nixos-install.sh

@ -83,8 +83,11 @@ if [[ ! -e $NIXOS_CONFIG && -z $system ]]; then
fi
# A place to drop temporary stuff.
tmpdir="$(mktemp -d -p $mountPoint)"
trap "rm -rf $tmpdir" EXIT
tmpdir="$(mktemp -d)"
# store temporary files on target filesystem by default
export TMPDIR=${TMPDIR:-$tmpdir}
sub="auto?trusted=1"

Loading…
Cancel
Save