packer-nixos/nixbox-template.json.orig

51 lines
1.3 KiB
JSON
Raw Normal View History

2013-11-27 12:11:51 -08:00
{
"builders": [
{
"type": "virtualbox",
"boot_wait": "1m",
"boot_command": [
"root<enter>",
"stop sshd<enter>",
"fdisk /dev/sda<enter>",
"n",
"<enter><enter><enter><enter><enter>",
"a<enter>",
"1<enter>",
"w<enter>",
"<wait>",
"mkfs.ext4 -j -L nixos /dev/sda1<enter><wait5>",
"mount LABEL=nixos /mnt<enter><wait>",
"nixos-generate-config --root /mnt<enter><wait>",
2013-11-27 12:48:07 -08:00
"curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/configuration.nix | sed -e 's|nixbox|NIXBOX|g' > /mnt/etc/nixos/configuration.nix<enter><wait>",
2013-11-27 12:11:51 -08:00
"nixos-install && reboot<enter>"
],
"guest_additions_mode": "disable",
"guest_os_type": "GUEST_OS",
"http_directory": "http",
"iso_checksum": "ISO_MD5",
"iso_checksum_type": "md5",
"iso_url": "ISO_URL",
"shutdown_command": "sudo shutdown -h now",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_wait_timeout": "5m",
"virtualbox_version_file": ".vbox_version"
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "sudo sh '{{.Path}}'",
"script": "scripts/postinstall.sh"
}
2013-11-27 12:36:32 -08:00
],
"post-processors": [
2013-11-27 12:48:07 -08:00
{
"type": "vagrant",
"output": "NIXBOX-{{.Provider}}.box"
}
2013-11-27 12:11:51 -08:00
]
}