From afd36a88ebe962269d169402b78da4d1142805cd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 17 Jan 2007 12:06:26 +0000 Subject: [PATCH] * Assume by default that the NixOS sources are in /etc/nixos. svn path=/nixos/trunk/; revision=7705 --- checkout-nixos.sh | 1 + test.sh | 9 +++++---- upgrade.sh | 9 +++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/checkout-nixos.sh b/checkout-nixos.sh index 3cf8af385414..662bd7298183 100755 --- a/checkout-nixos.sh +++ b/checkout-nixos.sh @@ -2,6 +2,7 @@ nix-channel --add http://nix.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable nix-channel --update nix-env -i subversion +cd /etc/nixos svn co https://svn.cs.uu.nl:12443/repos/trace/nixos/trunk nixos svn co https://svn.cs.uu.nl:12443/repos/trace/nixpkgs/trunk nixpkgs ln -s ../nixpkgs/pkgs nixos/pkgs diff --git a/test.sh b/test.sh index af9cb3c81e41..6ea5e055aa6f 100755 --- a/test.sh +++ b/test.sh @@ -1,8 +1,9 @@ #! /bin/sh -e -if test -z "$NIXOS_CONFIG"; then - NIXOS_CONFIG=/etc/nixos/configuration.nix -fi -nix-build system/system.nix \ + +if test -z "$NIXOS"; then NIXOS=/etc/nixos/nixos; fi +if test -z "$NIXOS_CONFIG"; then NIXOS_CONFIG=/etc/nixos/configuration.nix; fi + +nix-build $NIXOS/system/system.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 259e30fe31e2..5fb563871582 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -1,8 +1,9 @@ #! /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 system/system.nix \ + +if test -z "$NIXOS"; then NIXOS=/etc/nixos/nixos; fi +if test -z "$NIXOS_CONFIG"; then NIXOS_CONFIG=/etc/nixos/configuration.nix; fi + +nix-env -p /nix/var/nix/profiles/system -f $NIXOS/system/system.nix \ --arg configuration "import $NIXOS_CONFIG" \ --set -A system /nix/var/nix/profiles/system/bin/switch-to-configuration switch