packer-nixos/README.md
2022-07-15 01:49:53 +10:00

982 B

NixOS Image build scripts

NixOS is a linux distribution with a purely functional package manager.

These scripts build .box images that can be used by vagrant with the vagrant-nixos plugin for development, and other images suitable for production.

Building the images

First install packer and virtualbox

nix-shell -p packer

Then:

packer build template.json

The .box image is now ready to go. Install it into Vagrant via:

vagrant box add nixos-14.02-x86_64 nixos-14.02-x86_64-virtualbox.box

Using the images

Vagrant does not have a nixos guest plugin by default, so you'll need to install vagrant-nixos.

vagrant plugin install vagrant-nixos
vagrant init nixos-14.02-x86_64
vagrant up