packer-nixos/template.json

64 lines
2 KiB
JSON
Raw Normal View History

{
"builders": [
{
"boot_command": [
"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>",
"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>",
2014-02-02 18:32:28 -08:00
"curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/users-vagrant.nix > /mnt/etc/nixos/users.nix<enter><wait>",
2014-02-01 12:04:09 -08:00
"curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/vagrant.nix > /mnt/etc/nixos/vagrant.nix<enter><wait>",
2022-07-14 08:49:53 -07:00
"nixos-install \u0026\u0026 reboot<enter>"
],
2022-07-14 08:49:53 -07:00
"boot_wait": "1m",
"guest_additions_mode": "disable",
2014-01-31 03:28:11 -08:00
"guest_os_type": "Linux_64",
"http_directory": "nixos",
2022-07-14 08:49:53 -07:00
"iso_checksum": "sha256:aa9eeb04a491a84036368a93545400d79d16d281d4b7a29979bbb4f8476f9b81",
"iso_url": "https://releases.nixos.org/nixos/22.05/nixos-22.05.1700.365e1b3a859/nixos-minimal-22.05.1700.365e1b3a859-x86_64-linux.iso",
"shutdown_command": "sudo shutdown -h now",
2022-07-14 08:49:53 -07:00
"ssh_private_key_file": "keys/vagrant.key",
"ssh_timeout": "20m",
2014-01-31 03:28:11 -08:00
"ssh_username": "root",
2022-07-14 08:49:53 -07:00
"type": "virtualbox-iso",
2014-01-31 09:36:18 -08:00
"vboxmanage": [
2022-07-14 08:49:53 -07:00
[
"modifyvm",
"{{.Name}}",
"--memory",
"1024"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"2"
]
],
"virtualbox_version_file": ".vbox_version"
}
],
2022-07-14 08:49:53 -07:00
"post-processors": [
{
2022-07-14 08:49:53 -07:00
"output": "nixos-22.05-x86_64-{{.Provider}}.box",
"type": "vagrant"
}
2013-11-27 12:36:32 -08:00
],
2022-07-14 08:49:53 -07:00
"provisioners": [
2013-11-27 12:48:07 -08:00
{
2022-07-14 08:49:53 -07:00
"execute_command": "sudo sh '{{.Path}}'",
"script": "scripts/postinstall.sh",
"type": "shell"
2013-11-27 12:48:07 -08:00
}
]
}