2013-07-22 04:07:17 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-01-30 14:00:41 -08:00
|
|
|
# Checkout our nixpkg tree
|
|
|
|
NIXREPO=/etc/nixos/oxdi
|
|
|
|
mkdir -p $NIXREPO
|
|
|
|
cd $NIXREPO
|
|
|
|
git clone https://github.com/oxdi/nixpkgs.git
|
2013-07-22 04:07:17 -07:00
|
|
|
|
2014-01-30 14:00:41 -08:00
|
|
|
# Update and initialize our new configuration
|
|
|
|
nixos-rebuild -I nixos=$NIXREPO/nixos -I nixpkgs=$NIXREPO/nixpkgs switch
|
2013-07-22 04:07:17 -07:00
|
|
|
|
|
|
|
# Cleanup any previous generations and delete old packages that can be
|
|
|
|
# pruned.
|
|
|
|
for x in `seq 0 2` ; do
|
|
|
|
nix-env --delete-generations old
|
|
|
|
nix-collect-garbage -d
|
|
|
|
done
|
|
|
|
|
|
|
|
# Zero out the disk (for better compression)
|
|
|
|
dd if=/dev/zero of=/EMPTY bs=1M
|
|
|
|
rm -rf /EMPTY
|