summaryrefslogtreecommitdiffstats
path: root/nixos/modules
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2023-01-09 13:20:02 +0100
committerGitHub <noreply@github.com>2023-01-09 13:20:02 +0100
commitb8ee437596d02d8e8992f2a77153726651939f7c (patch)
tree5c078a8f85dcbc96b444e47790c015661515b6f9 /nixos/modules
parentb199b821c2986ea5ee5e1eb0e2d4baa4ddba1232 (diff)
parent19cfb3e48c775d3ef5d045265d3ded5cdb16df2c (diff)
Merge pull request #208643 from ncfavier/installer-test-tmp
Diffstat (limited to 'nixos/modules')
-rwxr-xr-x[-rw-r--r--]nixos/modules/installer/tools/nixos-enter.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/installer/tools/nixos-enter.sh b/nixos/modules/installer/tools/nixos-enter.sh
index 30113ee00508..60a86d89abb4 100644..100755
--- a/nixos/modules/installer/tools/nixos-enter.sh
+++ b/nixos/modules/installer/tools/nixos-enter.sh
@@ -100,8 +100,9 @@ chroot_add_resolv_conf "$mountPoint" || echo "$0: failed to set up resolv.conf"
# Run the activation script. Set $LOCALE_ARCHIVE to supress some Perl locale warnings.
LOCALE_ARCHIVE="$system/sw/lib/locale/locale-archive" IN_NIXOS_ENTER=1 chroot "$mountPoint" "$system/activate" 1>&2 || true
- # Create /tmp
- chroot "$mountPoint" "$system/sw/bin/systemd-tmpfiles" --create --remove --exclude-prefix=/dev 1>&2 || true
+ # Create /tmp. This is needed for nix-build and the NixOS activation script to work.
+ # Hide the unhelpful "failed to replace specifiers" errors caused by missing /etc/machine-id.
+ chroot "$mountPoint" "$system/sw/bin/systemd-tmpfiles" --create --remove -E 2> /dev/null || true
)
unset TMPDIR