Skip to content

Commit

Permalink
add var ssh_timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ifurther committed Jun 27, 2024
1 parent 186e793 commit fad7f12
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion nixos.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ variable "boot_wait" {
default = "120s"
}

variable "ssh_timeout" {
type = string
default = "15m"
}

variable "qemu_accelerator" {
type = string
default = "kvm"
Expand Down Expand Up @@ -135,7 +140,7 @@ source "qemu" "qemu" {
[ "-device", "virtio-net,netdev=forward,id=net0"]
]
shutdown_command = "sudo shutdown -h now"
ssh_timeout = "15m"
ssh_timeout = var.ssh_timeout
ssh_port = 22
ssh_private_key_file = "./scripts/install_ed25519"
ssh_username = "nixos"
Expand All @@ -162,6 +167,7 @@ source "qemu" "qemu-efi" {
]
shutdown_command = "sudo shutdown -h now"
machine_type = "q35"
ssh_timeout = var.ssh_timeout
ssh_port = 22
ssh_private_key_file = "./scripts/install_ed25519"
ssh_username = "nixos"
Expand All @@ -185,6 +191,7 @@ source "virtualbox-iso" "virtualbox" {
iso_checksum = var.iso_checksum
iso_url = local.iso_url
shutdown_command = "sudo shutdown -h now"
ssh_timeout = var.ssh_timeout
ssh_port = 22
ssh_username = "nixos"
vboxmanage = [["modifyvm", "{{ .Name }}", "--memory", var.memory, "--vram", "128", "--clipboard", "bidirectional"]]
Expand All @@ -207,6 +214,7 @@ source "virtualbox-iso" "virtualbox-efi" {
iso_url = local.iso_url
iso_interface = "sata"
shutdown_command = "sudo shutdown -h now"
ssh_timeout = var.ssh_timeout
ssh_port = 22
ssh_username = "nixos"
vboxmanage = [["modifyvm", "{{ .Name }}", "--memory", var.memory, "--vram", "128", "--clipboard", "bidirectional", "--firmware", "EFI"]]
Expand Down

0 comments on commit fad7f12

Please sign in to comment.