* Assume by default that the NixOS sources are in /etc/nixos.
svn path=/nixos/trunk/; revision=7705
This commit is contained in:
parent
cf9016d816
commit
afd36a88eb
@ -2,6 +2,7 @@
|
|||||||
nix-channel --add http://nix.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable
|
nix-channel --add http://nix.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable
|
||||||
nix-channel --update
|
nix-channel --update
|
||||||
nix-env -i subversion
|
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/nixos/trunk nixos
|
||||||
svn co https://svn.cs.uu.nl:12443/repos/trace/nixpkgs/trunk nixpkgs
|
svn co https://svn.cs.uu.nl:12443/repos/trace/nixpkgs/trunk nixpkgs
|
||||||
ln -s ../nixpkgs/pkgs nixos/pkgs
|
ln -s ../nixpkgs/pkgs nixos/pkgs
|
||||||
|
9
test.sh
9
test.sh
@ -1,8 +1,9 @@
|
|||||||
#! /bin/sh -e
|
#! /bin/sh -e
|
||||||
if test -z "$NIXOS_CONFIG"; then
|
|
||||||
NIXOS_CONFIG=/etc/nixos/configuration.nix
|
if test -z "$NIXOS"; then NIXOS=/etc/nixos/nixos; fi
|
||||||
fi
|
if test -z "$NIXOS_CONFIG"; then NIXOS_CONFIG=/etc/nixos/configuration.nix; fi
|
||||||
nix-build system/system.nix \
|
|
||||||
|
nix-build $NIXOS/system/system.nix \
|
||||||
--arg configuration "import $NIXOS_CONFIG" \
|
--arg configuration "import $NIXOS_CONFIG" \
|
||||||
-A system -K -k
|
-A system -K -k
|
||||||
./result/bin/switch-to-configuration test
|
./result/bin/switch-to-configuration test
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#! /bin/sh -e
|
#! /bin/sh -e
|
||||||
if test -z "$NIXOS_CONFIG"; then
|
|
||||||
NIXOS_CONFIG=/etc/nixos/configuration.nix
|
if test -z "$NIXOS"; then NIXOS=/etc/nixos/nixos; fi
|
||||||
fi
|
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 \
|
|
||||||
|
nix-env -p /nix/var/nix/profiles/system -f $NIXOS/system/system.nix \
|
||||||
--arg configuration "import $NIXOS_CONFIG" \
|
--arg configuration "import $NIXOS_CONFIG" \
|
||||||
--set -A system
|
--set -A system
|
||||||
/nix/var/nix/profiles/system/bin/switch-to-configuration switch
|
/nix/var/nix/profiles/system/bin/switch-to-configuration switch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user