diff --git a/checkout-nixos.sh b/checkout-nixos.sh index 3cf8af38541..662bd729818 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 af9cb3c81e4..6ea5e055aa6 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 259e30fe31e..5fb56387158 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