1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/modules/installer/tools/nixos-bootstrap-archive/default.nix
Marc Weber 401fd84ae1 kvm installation test update + NixOS installation archive
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
2009-12-15 06:37:32 +00:00

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