* Consistent naming.

svn path=/nixos/trunk/; revision=7851
This commit is contained in:
Eelco Dolstra 2007-02-06 10:41:04 +00:00
parent 6c4701f7cc
commit 3481970525
2 changed files with 16 additions and 16 deletions

2
README
View File

@ -135,5 +135,5 @@ To get out of maintenance mode:
$ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1 $ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1
$ yes | mke2fs -j diskimage $ yes | mke2fs -j diskimage
$ mount -o loop diskimage /mnt $ mount -o loop diskimage /mnt
$ ./result/bin/nixos-installer /mnt /etc/nixos/nixos/ /etc/nixos/configuration.nix $ ./result/bin/nixos-installer

View File

@ -15,12 +15,12 @@ if test -z "$mountPoint"; then
mountPoint=/mnt mountPoint=/mnt
fi fi
if test -z "$nixosDir"; then if test -z "$NIXOS"; then
nixosDir=/etc/nixos/nixos NIXOS=/etc/nixos/nixos
fi fi
if test -z "$nixosConfiguration"; then if test -z "$NIXOS_CONFIG"; then
nixosConfiguration=/etc/nixos/configuration.nix NIXOS_CONFIG=/etc/nixos/configuration.nix
fi fi
if ! test -e "$mountPoint"; then if ! test -e "$mountPoint"; then
@ -33,19 +33,19 @@ if ! grep -F -q " $mountPoint " /proc/mounts; then
exit 1 exit 1
fi fi
if ! test -e "$nixosDir"; then if ! test -e "$NIXOS"; then
echo "NixOS source directory $nixosDir doesn't exist" echo "NixOS source directory $NIXOS doesn't exist"
exit 1 exit 1
fi fi
if ! test -e "$nixosConfiguration"; then if ! test -e "$NIXOS_CONFIG"; then
echo "configuration file $nixosConfiguration doesn't exist" echo "configuration file $NIXOS_CONFIG doesn't exist"
exit 1 exit 1
fi fi
nixosDir=$(readlink -f "$nixosDir") NIXOS=$(readlink -f "$NIXOS")
nixosConfiguration=$(readlink -f "$nixosConfiguration") NIXOS_CONFIG=$(readlink -f "$NIXOS_CONFIG")
# Mount some stuff in the target root directory. # Mount some stuff in the target root directory.
@ -141,8 +141,8 @@ fi
echo "building the system configuration..." echo "building the system configuration..."
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/system/system.nix" \ -f "/mnt$NIXOS/system/system.nix" \
--arg configuration "import /mnt$nixosConfiguration" \ --arg configuration "import /mnt$NIXOS_CONFIG" \
--set -A system --set -A system
@ -153,8 +153,8 @@ mkdir -p $(dirname $targetConfig)
if test -e $targetConfig -o -L $targetConfig; then if test -e $targetConfig -o -L $targetConfig; then
cp -f $targetConfig $targetConfig.backup-$backupTimestamp cp -f $targetConfig $targetConfig.backup-$backupTimestamp
fi fi
if test "$nixosConfiguration" != "$targetConfig"; then if test "$NIXOS_CONFIG" != "$targetConfig"; then
cp -f $nixosConfiguration $targetConfig cp -f $NIXOS_CONFIG $targetConfig
fi fi
@ -173,7 +173,7 @@ fi
# Copy the NixOS/Nixpkgs sources to the target. # Copy the NixOS/Nixpkgs sources to the target.
cp -prd $nixosDir $targetNixos cp -prd $NIXOS $targetNixos
if test -e /etc/nixos/nixpkgs; then if test -e /etc/nixos/nixpkgs; then
cp -prd /etc/nixos/nixpkgs $targetNixpkgs cp -prd /etc/nixos/nixpkgs $targetNixpkgs
fi fi