2014-02-02 18:32:28 -08:00
NixOS Image build scripts
=========================
2013-04-05 07:23:17 -07:00
2014-02-02 18:32:28 -08:00
[NixOS ](http://nixos.org ) is a linux distribution with a purely functional
2014-01-29 04:47:06 -08:00
package manager.
2013-11-27 12:54:15 -08:00
2014-02-02 18:32:28 -08:00
These scripts build .box images that can be used by [vagrant ](http://vagrantup.com ) with the [vagrant-nixos ](http://github.com/oxdi/vagrant-nixos ) plugin for development, and other images suitable for production.
2014-01-29 04:57:36 -08:00
2013-11-27 14:04:36 -08:00
2013-11-27 12:54:15 -08:00
Building the images
-------------------
2014-01-29 04:47:06 -08:00
First install [packer ](http://packer.io ) and [virtualbox ](https://www.virtualbox.org/ )
2013-07-22 04:07:17 -07:00
Then:
2014-01-31 08:38:54 -08:00
```bash
2014-01-31 03:28:11 -08:00
packer build template.json
2014-01-29 04:47:06 -08:00
```
The .box image is now ready to go. Install it into Vagrant via:
2014-01-31 08:38:54 -08:00
```bash
2014-02-02 18:32:28 -08:00
vagrant box add nixos-14.02-x86_64 nixos-14.02-x86_64-virtualbox.box
2014-01-30 14:00:41 -08:00
```
2014-02-02 18:32:28 -08:00
Using the images
----------------
Vagrant does not have a nixos guest plugin by default, so you'll need to install [vagrant-nixos ](http://github.com/oxdi/vagrant-nixos ).
2014-01-30 14:00:41 -08:00
2014-01-31 08:38:54 -08:00
```bash
2014-02-02 18:32:28 -08:00
vagrant plugin install vagrant-nixos
vagrant init nixos-14.02-x86_64
vagrant up
2014-01-30 14:00:41 -08:00
```