
You can run the kvm nixos installation test by: nix-build --no-out-link tests/test-nixos-install-from-cd.nix It boots the installed system. It still fails sshd isn't started (yet) adding nixos-bootstrapping-archive: You can install NixOS easily using any live cd now. See README-BOOTSTRAP-NIXOS svn path=/nixos/trunk/; revision=18950
21 lines
713 B
Nix
21 lines
713 B
Nix
args: with args;
|
|
|
|
# TODO add revision number or such
|
|
runCommand "nixos-bootstrap-archive" { } ''
|
|
PATH=${perl}/bin:${coreutils}/bin:${gnutar}/bin:${bzip2}/bin
|
|
storePaths=$(perl ${pathsFromGraph} ${nixClosure})
|
|
|
|
s(){ echo -C $(dirname $1) $(basename $1); }
|
|
|
|
mkdir $out
|
|
tar cf tmp.tar ${nixClosure} $storePaths
|
|
cp ${./README-BOOTSTRAP-NIXOS} README-BOOTSTRAP-NIXOS
|
|
tar --append -f tmp.tar README-BOOTSTRAP-NIXOS
|
|
tar --append -f tmp.tar --transform 's@^@/nix/store/@' \
|
|
$(s ${nixosPrepareInstall}/bin/nixos-prepare-install ) \
|
|
$(s ${runInChroot}/bin/run-in-chroot ) \
|
|
$(s ${nixosBootstrap}/bin/nixos-bootstrap )
|
|
|
|
cat tmp.tar | bzip2 > $out/nixos-install-archive.tar.bz2
|
|
''
|