2013-07-22 04:07:17 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Make sure we are totally up to date
|
|
|
|
|
2013-11-09 07:01:41 -08:00
|
|
|
nix-channel --add http://nixos.org/channels/nixos-13.10 nixos
|
|
|
|
nixos-rebuild switch --upgrade
|
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
|