* Assume by default that the NixOS sources are in /etc/nixos.

svn path=/nixos/trunk/; revision=7705
This commit is contained in:
Eelco Dolstra 2007-01-17 12:06:26 +00:00
parent cf9016d816
commit afd36a88eb
3 changed files with 11 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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