From 482a6625a9efb3ccf7a943871ac5d06b9b92a514 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 12 Dec 2006 00:08:26 +0000 Subject: [PATCH] * Use the configuration in /etc/nixos/configuration.nix by default. svn path=/nixos/trunk/; revision=7319 --- boot/boot-stage-2-init.sh | 2 ++ test.sh | 8 +++++--- upgrade.sh | 8 +++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/boot/boot-stage-2-init.sh b/boot/boot-stage-2-init.sh index c31b4620911a..364c6b682429 100644 --- a/boot/boot-stage-2-init.sh +++ b/boot/boot-stage-2-init.sh @@ -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 diff --git a/test.sh b/test.sh index 7411e3955f6c..cbb97bc700d7 100755 --- a/test.sh +++ b/test.sh @@ -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 diff --git a/upgrade.sh b/upgrade.sh index 1022564d9c1b..19307ac1e1d1 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -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