* Use the configuration in /etc/nixos/configuration.nix by default.

svn path=/nixos/trunk/; revision=7319
This commit is contained in:
Eelco Dolstra 2006-12-12 00:08:26 +00:00
parent 2d0f190f20
commit 482a6625a9
3 changed files with 12 additions and 6 deletions

View File

@ -41,6 +41,8 @@ test -e /etc/fstab || touch /etc/fstab # idem
mount -n -t proc none /proc
cat /proc/mounts > /etc/mtab
mkdir -m 0755 -p /etc/nixos
# Process the kernel command line.
for o in $(cat /proc/cmdline); do

View File

@ -1,6 +1,8 @@
#! /bin/sh
set -e
#! /bin/sh -e
if test -z "$NIXOS_CONFIG"; then
NIXOS_CONFIG=/etc/nixos/configuration.nix
fi
nix-build configuration/system.nix \
--arg configuration 'import ./instances/example.nix' \
--arg configuration "import $NIXOS_CONFIG" \
-A system -K -k
./result/bin/switch-to-configuration test

View File

@ -1,6 +1,8 @@
#! /bin/sh
set -e
#! /bin/sh -e
if test -z "$NIXOS_CONFIG"; then
NIXOS_CONFIG=/etc/nixos/configuration.nix
fi
nix-env -p /nix/var/nix/profiles/system -f configuration/system.nix \
--arg configuration 'import ./instances/example.nix' \
--arg configuration "import $NIXOS_CONFIG" \
-i -A system
/nix/var/nix/profiles/system/bin/switch-to-configuration switch