Merge pull request #85996 from misuzu/nixos-install-low-memory
nixos/nixos-installer: use temporary directory on target filesystem
commitafbab5a3f3e3e793d61c239ec73b9371c9bfc16b
authorAlexey Shmalko <rasen.dubi@gmail.com>
dateFri 8 May 2020, 18:40 (7 years ago)
parent8fc74485700232
nixos/modules/installer/tools/nixos-install.sh+4−1
@@ -87,8 +87,11 @@ if [[ ! -e $NIXOS_CONFIG && -z $system ]]; then
8787fi
8888
8989# A place to drop temporary stuff.
90+tmpdir="$(mktemp -d -p $mountPoint)"
9091trap "rm -rf $tmpdir" EXIT
91−tmpdir="$(mktemp -d)"
92+
93+# store temporary files on target filesystem by default
94+export TMPDIR=${TMPDIR:-$tmpdir}
9295
9396sub="auto?trusted=1"
9497