raskchanky / packer-nixos

1 stars 2 forks source link

Postinstall.sh questions #2

Open CMCDragonkai opened 10 years ago

CMCDragonkai commented 10 years ago

In your postinstall.sh you have these 2 stanzas that I'm confused about:

for x in `seq 0 2` ; do
    nix-env --delete-generations old
    nix-collect-garbage -d
done

Why do you run this three times?

dd if=/dev/zero of=/EMPTY bs=1M
rm -rf /EMPTY

What does this do? You're creating a device called Empty filled with zeroes and then just removing the Empty. What's the point?

raskchanky commented 10 years ago

I cargo-culted most of that from https://github.com/dysinger/nixbox/blob/master/definitions/nixos32/postinstall.sh

CMCDragonkai commented 10 years ago

yea they didnt seem useful