2013-11-27 05:08:23 -08:00
|
|
|
{
|
|
|
|
"builders": [
|
|
|
|
{
|
2014-01-29 04:47:06 -08:00
|
|
|
"type": "virtualbox-iso",
|
2014-01-31 03:28:11 -08:00
|
|
|
"boot_wait": "1m",
|
2013-11-27 05:08:23 -08:00
|
|
|
"boot_command": [
|
|
|
|
"root<enter>",
|
|
|
|
"stop sshd<enter>",
|
|
|
|
"fdisk /dev/sda<enter>",
|
|
|
|
"n",
|
|
|
|
"<enter><enter><enter><enter><enter>",
|
|
|
|
"a<enter>",
|
|
|
|
"1<enter>",
|
|
|
|
"w<enter>",
|
|
|
|
"<wait>",
|
2013-11-27 12:11:51 -08:00
|
|
|
"mkfs.ext4 -j -L nixos /dev/sda1<enter><wait5>",
|
2013-11-27 05:08:23 -08:00
|
|
|
"mount LABEL=nixos /mnt<enter><wait>",
|
|
|
|
"nixos-generate-config --root /mnt<enter><wait>",
|
2014-02-01 12:04:09 -08:00
|
|
|
"curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/configuration.nix > /mnt/etc/nixos/configuration.nix<enter><wait>",
|
|
|
|
"curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/guest-virtualbox.nix > /mnt/etc/nixos/guest.nix<enter><wait>",
|
|
|
|
"curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/vagrant.nix > /mnt/etc/nixos/vagrant.nix<enter><wait>",
|
|
|
|
"nix-env -i git && (cd /mnt/etc/nixos && git clone git://github.com/oxdi/nixpkgs.git) && nixos-install && reboot<enter>"
|
2013-11-27 05:08:23 -08:00
|
|
|
],
|
|
|
|
"guest_additions_mode": "disable",
|
2014-01-31 03:28:11 -08:00
|
|
|
"guest_os_type": "Linux_64",
|
|
|
|
"http_directory": "nixos",
|
2014-01-31 09:36:18 -08:00
|
|
|
"iso_checksum": "48395b4bd21675703c87cfae1feb68ed",
|
2013-11-27 05:08:23 -08:00
|
|
|
"iso_checksum_type": "md5",
|
2014-01-31 09:36:18 -08:00
|
|
|
"iso_url": "http://releases.nixos.org/nixos/unstable/nixos-14.02pre38596.1dd0e05/nixos-minimal-14.02pre38596.1dd0e05-x86_64-linux.iso",
|
2013-11-27 05:08:23 -08:00
|
|
|
"shutdown_command": "sudo shutdown -h now",
|
2014-01-31 03:28:11 -08:00
|
|
|
"ssh_username": "root",
|
2014-02-01 12:04:09 -08:00
|
|
|
"ssh_key_path": "keys/vagrant.key",
|
|
|
|
"ssh_wait_timeout": "20m",
|
2014-01-31 09:36:18 -08:00
|
|
|
"virtualbox_version_file": ".vbox_version",
|
|
|
|
"vboxmanage": [
|
|
|
|
["modifyvm", "{{.Name}}", "--memory", "2048"],
|
|
|
|
["modifyvm", "{{.Name}}", "--cpus", "2"]
|
|
|
|
]
|
2013-11-27 05:08:23 -08:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"provisioners": [
|
|
|
|
{
|
|
|
|
"type": "shell",
|
2013-11-27 12:11:51 -08:00
|
|
|
"execute_command": "sudo sh '{{.Path}}'",
|
2013-11-27 05:08:23 -08:00
|
|
|
"script": "scripts/postinstall.sh"
|
|
|
|
}
|
2013-11-27 12:36:32 -08:00
|
|
|
],
|
|
|
|
"post-processors": [
|
2013-11-27 12:48:07 -08:00
|
|
|
{
|
|
|
|
"type": "vagrant",
|
2014-01-31 09:57:31 -08:00
|
|
|
"output": "cycle-14.02-x86_64-{{.Provider}}.box"
|
2013-11-27 12:48:07 -08:00
|
|
|
}
|
2013-11-27 05:08:23 -08:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|