mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
* More installer fixes.
svn path=/nixos/trunk/; revision=7359
This commit is contained in:
parent
a0759a51e9
commit
c5ab0cec9f
@ -123,17 +123,17 @@ fi
|
|||||||
|
|
||||||
chroot $mountPoint @nix@/bin/nix-env \
|
chroot $mountPoint @nix@/bin/nix-env \
|
||||||
-p /nix/var/nix/profiles/system \
|
-p /nix/var/nix/profiles/system \
|
||||||
-f "/mnt/$nixosDir/configuration/system.nix" \
|
-f "/mnt$nixosDir/configuration/system.nix" \
|
||||||
--arg configuration "import /mnt/$configuration" \
|
--arg configuration "import /mnt$configuration" \
|
||||||
--set -A system
|
--set -A system
|
||||||
|
|
||||||
|
|
||||||
# Copy the configuration to /etc/nixos.
|
# Copy the configuration to /etc/nixos.
|
||||||
if test -e $mountPoint/etc/nixos/configuration.nix; then
|
targetConfig=$mountPoint/etc/nixos/configuration.nix
|
||||||
mv $mountPoint/etc/nixos/configuration.nix \
|
if test -e $targetConfig -o -L $targetConfig; then
|
||||||
$mountPoint/etc/nixos/configuration.backup-$(date "+%Y%m%d%H%M%S").nix
|
mv $targetConfig $targetConfig.backup-$(date "+%Y%m%d%H%M%S")
|
||||||
fi
|
fi
|
||||||
cp $configuration $mountPoint/etc/nixos/configuration.nix
|
cp $configuration $targetConfig
|
||||||
|
|
||||||
|
|
||||||
# Grub needs a mtab.
|
# Grub needs a mtab.
|
||||||
@ -149,4 +149,5 @@ touch $mountPoint/etc/NIXOS
|
|||||||
# a menu default pointing at the kernel/initrd/etc of the new
|
# a menu default pointing at the kernel/initrd/etc of the new
|
||||||
# configuration.
|
# configuration.
|
||||||
echo "finalising the installation..."
|
echo "finalising the installation..."
|
||||||
NIXOS_INSTALL_GRUB=1 chroot $mountPoint /nix/var/nix/profiles/system/bin/switch-to-configuration
|
NIXOS_INSTALL_GRUB=1 chroot $mountPoint \
|
||||||
|
/nix/var/nix/profiles/system/bin/switch-to-configuration boot
|
||||||
|
Loading…
Reference in New Issue
Block a user