packer-nixos/nixos32-template.json
Jonas Pfenniger c4017fe605 Porting to packer
Still not working yet, it's blocking on the SSHd server after install.
2013-07-22 12:09:04 +01:00

132 lines
3.8 KiB
JSON

{
"provisioners": [
{
"type": "shell",
"scripts": [
"scripts/postinstall.sh"
],
"override": {
"virtualbox": {
"execute_command": "sudo '{{.Path}}'"
},
"vmware": {
"execute_command": "sudo '{{.Path}}'"
}
}
}
],
"builders": [
{
"type": "virtualbox",
"boot_command": [
"<enter><wait>",
"<wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait>",
"root<wait>",
"<enter><wait>",
"stop sshd<wait>",
"<enter><wait>",
"fdisk /dev/sda<wait>",
"<enter><wait>",
"n<wait>",
"<enter><enter><enter><enter><enter><wait>",
"a<wait>",
"<enter><wait>",
"1<wait>",
"<enter><wait>",
"w<wait>",
"<enter><wait>",
"mkfs.ext4 -j -L nixos /dev/sda1<wait>",
"<enter><wait>",
"mount LABEL=nixos /mnt<wait>",
"<enter><wait>",
"nixos-option --install<wait>",
"<enter><wait>",
"curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/configuration.nix > /mnt/etc/nixos/configuration.nix &&<wait>",
"<enter><wait>",
"nixos-install &&<wait>",
"<enter><wait>",
"reboot<wait>",
"<enter><wait>"
],
"boot_wait": "5s",
"disk_size": 20400,
"guest_os_type": "Linux26",
"http_directory": "http",
"iso_checksum": "b1a78fc1b72ea1a19957cb1422817ab6",
"iso_checksum_type": "md5",
"iso_url": "http://nixos.org/releases/nixos/nixos-13.07pre4871_18de9f6-3c35dae/nixos-minimal-13.07pre4871_18de9f6-3c35dae-i686-linux.iso",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "sudo shutdown -h now",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"virtualbox_version_file": ".vbox_version",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"256"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"1"
]
]
},
{
"type": "vmware",
"boot_command": [
"<enter><wait>",
"<wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait>",
"root<wait>",
"<enter><wait>",
"stop sshd<wait>",
"<enter><wait>",
"fdisk /dev/sda<wait>",
"<enter><wait>",
"n<wait>",
"<enter><enter><enter><enter><enter><wait>",
"a<wait>",
"<enter><wait>",
"1<wait>",
"<enter><wait>",
"w<wait>",
"<enter><wait>",
"mkfs.ext4 -j -L nixos /dev/sda1<wait>",
"<enter><wait>",
"mount LABEL=nixos /mnt<wait>",
"<enter><wait>",
"nixos-option --install<wait>",
"<enter><wait>",
"curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/configuration.nix > /mnt/etc/nixos/configuration.nix &&<wait>",
"<enter><wait>",
"nixos-install &&<wait>",
"<enter><wait>",
"reboot<wait>",
"<enter><wait>"
],
"boot_wait": "5s",
"disk_size": 20400,
"guest_os_type": "other26xlinux",
"http_directory": "http",
"iso_checksum": "b1a78fc1b72ea1a19957cb1422817ab6",
"iso_checksum_type": "md5",
"iso_url": "http://nixos.org/releases/nixos/nixos-13.07pre4871_18de9f6-3c35dae/nixos-minimal-13.07pre4871_18de9f6-3c35dae-i686-linux.iso",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "sudo shutdown -h now",
"vmx_data": {
"memsize": "256",
"numvcpus": "1",
"cpuid.coresPerSocket": "1"
}
}
]
}