nixos-install: ensure activation script is always called

The activation script is needed to get the missing files in etc/ created.
Needed for container manager like systemd-nspawn.
This commit is contained in:
Christian Kögler
2019-09-13 17:33:34 +02:00
committed by Franz Pletz
parent 65792923af
commit 930ac600d2
3 changed files with 4 additions and 21 deletions
@@ -132,8 +132,9 @@ if [[ -z $noBootLoader ]]; then
echo "installing the boot loader..."
# Grub needs an mtab.
ln -sfn /proc/mounts $mountPoint/etc/mtab
NIXOS_INSTALL_BOOTLOADER=1 nixos-enter --root "$mountPoint" -- /run/current-system/bin/switch-to-configuration boot
export NIXOS_INSTALL_BOOTLOADER=1
fi
nixos-enter --root "$mountPoint" -- /run/current-system/bin/switch-to-configuration boot
# Ask the user to set a root password, but only if the passwd command
# exists (i.e. when mutable user accounts are enabled).