Skip to content

Commit b526142

Browse files
committed
fix: use temporary install key generated with ssh-keygen -t ed25519 to fix nix-community#74
chore: urls to latest ISOs with existing iso_urls_update.rb script
1 parent a64dea2 commit b526142

File tree

8 files changed

+49
-69
lines changed

8 files changed

+49
-69
lines changed

gen_template.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ def builder(**opts)
2020
boot_command: [
2121
'echo http://{{ .HTTPIP }}:{{ .HTTPPort}} > .packer_http<enter>',
2222
'mkdir -m 0700 .ssh<enter>',
23-
'curl $(cat .packer_http)/install_rsa.pub > .ssh/authorized_keys<enter>',
23+
'curl $(cat .packer_http)/install_key.pub > .ssh/authorized_keys<enter>',
2424
'sudo systemctl start sshd<enter>',
2525
],
2626
http_directory: 'scripts',
2727
shutdown_command: 'sudo shutdown -h now',
28-
ssh_private_key_file: './scripts/install_rsa',
28+
ssh_private_key_file: './scripts/install_key',
2929
ssh_port: 22,
3030
ssh_username: 'nixos',
3131
headless: true
@@ -91,7 +91,7 @@ def gen_template(
9191
boot_command: [
9292
"echo http://{{ .HTTPIP }}:{{ .HTTPPort}} > .packer_http<enter>",
9393
"mkdir -m 0700 .ssh<enter>",
94-
"curl $(cat .packer_http)/install_rsa.pub > .ssh/authorized_keys<enter>",
94+
"curl $(cat .packer_http)/install_key.pub > .ssh/authorized_keys<enter>",
9595
# remaining commands run as root
9696
"sudo su --<enter>",
9797
"nix-env -iA nixos.linuxPackages.hyperv-daemons<enter><wait10>",

iso_urls.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"x86_64": {
3-
"iso_url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3443.ee90403e147/nixos-minimal-21.05.3443.ee90403e147-x86_64-linux.iso",
4-
"iso_sha256": "7fec8949043bca97c6930177af868532219aa4037017f2f6122094035eeafb1c"
3+
"iso_url": "https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-x86_64-linux.iso",
4+
"iso_sha256": "7cb910f01993cdbbaae87ab54e5317be28a268c0ef71f6c919ab759f2a9f00e2"
55
},
66
"i686": {
7-
"iso_url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3443.ee90403e147/nixos-minimal-21.05.3443.ee90403e147-i686-linux.iso",
8-
"iso_sha256": "3ef4743ded79c72d91a6f71d06f9868c62c769a99ca79e398869a7f02b8bcb14"
7+
"iso_url": "https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-i686-linux.iso",
8+
"iso_sha256": "9bb6469fa944045d20d82e66f74dee037cb868a4b9a4f0e6f76df1e304a23579"
99
}
1010
}

nixos-i686.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
"boot_command": [
1010
"echo http://{{ .HTTPIP }}:{{ .HTTPPort}} > .packer_http<enter>",
1111
"mkdir -m 0700 .ssh<enter>",
12-
"curl $(cat .packer_http)/install_rsa.pub > .ssh/authorized_keys<enter>",
12+
"curl $(cat .packer_http)/install_key.pub > .ssh/authorized_keys<enter>",
1313
"sudo systemctl start sshd<enter>"
1414
],
1515
"http_directory": "scripts",
1616
"shutdown_command": "sudo shutdown -h now",
17-
"ssh_private_key_file": "./scripts/install_rsa",
17+
"ssh_private_key_file": "./scripts/install_key",
1818
"ssh_port": 22,
1919
"ssh_username": "nixos",
2020
"headless": true,
2121
"type": "virtualbox-iso",
22-
"iso_url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3443.ee90403e147/nixos-minimal-21.05.3443.ee90403e147-i686-linux.iso",
23-
"iso_checksum": "3ef4743ded79c72d91a6f71d06f9868c62c769a99ca79e398869a7f02b8bcb14",
22+
"iso_url": "https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-i686-linux.iso",
23+
"iso_checksum": "9bb6469fa944045d20d82e66f74dee037cb868a4b9a4f0e6f76df1e304a23579",
2424
"guest_additions_mode": "disable",
2525
"format": "ova",
2626
"guest_os_type": "Linux",
@@ -43,18 +43,18 @@
4343
"boot_command": [
4444
"echo http://{{ .HTTPIP }}:{{ .HTTPPort}} > .packer_http<enter>",
4545
"mkdir -m 0700 .ssh<enter>",
46-
"curl $(cat .packer_http)/install_rsa.pub > .ssh/authorized_keys<enter>",
46+
"curl $(cat .packer_http)/install_key.pub > .ssh/authorized_keys<enter>",
4747
"sudo systemctl start sshd<enter>"
4848
],
4949
"http_directory": "scripts",
5050
"shutdown_command": "sudo shutdown -h now",
51-
"ssh_private_key_file": "./scripts/install_rsa",
51+
"ssh_private_key_file": "./scripts/install_key",
5252
"ssh_port": 22,
5353
"ssh_username": "nixos",
5454
"headless": true,
5555
"type": "qemu",
56-
"iso_url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3443.ee90403e147/nixos-minimal-21.05.3443.ee90403e147-i686-linux.iso",
57-
"iso_checksum": "3ef4743ded79c72d91a6f71d06f9868c62c769a99ca79e398869a7f02b8bcb14",
56+
"iso_url": "https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-i686-linux.iso",
57+
"iso_checksum": "9bb6469fa944045d20d82e66f74dee037cb868a4b9a4f0e6f76df1e304a23579",
5858
"disk_interface": "virtio-scsi",
5959
"disk_size": "{{ user `disk_size` }}",
6060
"format": "qcow2",
@@ -70,22 +70,22 @@
7070
"boot_command": [
7171
"echo http://{{ .HTTPIP }}:{{ .HTTPPort}} > .packer_http<enter>",
7272
"mkdir -m 0700 .ssh<enter>",
73-
"curl $(cat .packer_http)/install_rsa.pub > .ssh/authorized_keys<enter>",
73+
"curl $(cat .packer_http)/install_key.pub > .ssh/authorized_keys<enter>",
7474
"sudo su --<enter>",
7575
"nix-env -iA nixos.linuxPackages.hyperv-daemons<enter><wait10>",
7676
"$(find /nix/store -executable -iname 'hv_kvp_daemon' | head -n 1)<enter><wait10>",
7777
"systemctl start sshd<enter>"
7878
],
7979
"http_directory": "scripts",
8080
"shutdown_command": "sudo shutdown -h now",
81-
"ssh_private_key_file": "./scripts/install_rsa",
81+
"ssh_private_key_file": "./scripts/install_key",
8282
"ssh_port": 22,
8383
"ssh_username": "nixos",
8484
"headless": true,
8585
"type": "hyperv-iso",
8686
"generation": 1,
87-
"iso_url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3443.ee90403e147/nixos-minimal-21.05.3443.ee90403e147-i686-linux.iso",
88-
"iso_checksum": "3ef4743ded79c72d91a6f71d06f9868c62c769a99ca79e398869a7f02b8bcb14",
87+
"iso_url": "https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-i686-linux.iso",
88+
"iso_checksum": "9bb6469fa944045d20d82e66f74dee037cb868a4b9a4f0e6f76df1e304a23579",
8989
"memory": "{{ user `memory` }}",
9090
"disk_size": "{{ user `disk_size` }}",
9191
"enable_secure_boot": false,
@@ -99,18 +99,18 @@
9999
"boot_command": [
100100
"echo http://{{ .HTTPIP }}:{{ .HTTPPort}} > .packer_http<enter>",
101101
"mkdir -m 0700 .ssh<enter>",
102-
"curl $(cat .packer_http)/install_rsa.pub > .ssh/authorized_keys<enter>",
102+
"curl $(cat .packer_http)/install_key.pub > .ssh/authorized_keys<enter>",
103103
"sudo systemctl start sshd<enter>"
104104
],
105105
"http_directory": "scripts",
106106
"shutdown_command": "sudo shutdown -h now",
107-
"ssh_private_key_file": "./scripts/install_rsa",
107+
"ssh_private_key_file": "./scripts/install_key",
108108
"ssh_port": 22,
109109
"ssh_username": "nixos",
110110
"headless": true,
111111
"type": "vmware-iso",
112-
"iso_url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3443.ee90403e147/nixos-minimal-21.05.3443.ee90403e147-i686-linux.iso",
113-
"iso_checksum": "3ef4743ded79c72d91a6f71d06f9868c62c769a99ca79e398869a7f02b8bcb14",
112+
"iso_url": "https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-i686-linux.iso",
113+
"iso_checksum": "9bb6469fa944045d20d82e66f74dee037cb868a4b9a4f0e6f76df1e304a23579",
114114
"memory": "{{ user `memory` }}",
115115
"disk_size": "{{ user `disk_size` }}",
116116
"guest_os_type": "Linux"
@@ -133,7 +133,7 @@
133133
"qemu",
134134
"hyperv-iso"
135135
],
136-
"output": "nixos-21.05-{{.Provider}}-i686.box"
136+
"output": "nixos-21.11-{{.Provider}}-i686.box"
137137
}
138138
]
139139
]

nixos-x86_64.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
"boot_command": [
1010
"echo http://{{ .HTTPIP }}:{{ .HTTPPort}} > .packer_http<enter>",
1111
"mkdir -m 0700 .ssh<enter>",
12-
"curl $(cat .packer_http)/install_rsa.pub > .ssh/authorized_keys<enter>",
12+
"curl $(cat .packer_http)/install_key.pub > .ssh/authorized_keys<enter>",
1313
"sudo systemctl start sshd<enter>"
1414
],
1515
"http_directory": "scripts",
1616
"shutdown_command": "sudo shutdown -h now",
17-
"ssh_private_key_file": "./scripts/install_rsa",
17+
"ssh_private_key_file": "./scripts/install_key",
1818
"ssh_port": 22,
1919
"ssh_username": "nixos",
2020
"headless": true,
2121
"type": "virtualbox-iso",
22-
"iso_url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3443.ee90403e147/nixos-minimal-21.05.3443.ee90403e147-x86_64-linux.iso",
23-
"iso_checksum": "7fec8949043bca97c6930177af868532219aa4037017f2f6122094035eeafb1c",
22+
"iso_url": "https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-x86_64-linux.iso",
23+
"iso_checksum": "7cb910f01993cdbbaae87ab54e5317be28a268c0ef71f6c919ab759f2a9f00e2",
2424
"guest_additions_mode": "disable",
2525
"format": "ova",
2626
"guest_os_type": "Linux_64",
@@ -43,18 +43,18 @@
4343
"boot_command": [
4444
"echo http://{{ .HTTPIP }}:{{ .HTTPPort}} > .packer_http<enter>",
4545
"mkdir -m 0700 .ssh<enter>",
46-
"curl $(cat .packer_http)/install_rsa.pub > .ssh/authorized_keys<enter>",
46+
"curl $(cat .packer_http)/install_key.pub > .ssh/authorized_keys<enter>",
4747
"sudo systemctl start sshd<enter>"
4848
],
4949
"http_directory": "scripts",
5050
"shutdown_command": "sudo shutdown -h now",
51-
"ssh_private_key_file": "./scripts/install_rsa",
51+
"ssh_private_key_file": "./scripts/install_key",
5252
"ssh_port": 22,
5353
"ssh_username": "nixos",
5454
"headless": true,
5555
"type": "qemu",
56-
"iso_url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3443.ee90403e147/nixos-minimal-21.05.3443.ee90403e147-x86_64-linux.iso",
57-
"iso_checksum": "7fec8949043bca97c6930177af868532219aa4037017f2f6122094035eeafb1c",
56+
"iso_url": "https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-x86_64-linux.iso",
57+
"iso_checksum": "7cb910f01993cdbbaae87ab54e5317be28a268c0ef71f6c919ab759f2a9f00e2",
5858
"disk_interface": "virtio-scsi",
5959
"disk_size": "{{ user `disk_size` }}",
6060
"format": "qcow2",
@@ -70,22 +70,22 @@
7070
"boot_command": [
7171
"echo http://{{ .HTTPIP }}:{{ .HTTPPort}} > .packer_http<enter>",
7272
"mkdir -m 0700 .ssh<enter>",
73-
"curl $(cat .packer_http)/install_rsa.pub > .ssh/authorized_keys<enter>",
73+
"curl $(cat .packer_http)/install_key.pub > .ssh/authorized_keys<enter>",
7474
"sudo su --<enter>",
7575
"nix-env -iA nixos.linuxPackages.hyperv-daemons<enter><wait10>",
7676
"$(find /nix/store -executable -iname 'hv_kvp_daemon' | head -n 1)<enter><wait10>",
7777
"systemctl start sshd<enter>"
7878
],
7979
"http_directory": "scripts",
8080
"shutdown_command": "sudo shutdown -h now",
81-
"ssh_private_key_file": "./scripts/install_rsa",
81+
"ssh_private_key_file": "./scripts/install_key",
8282
"ssh_port": 22,
8383
"ssh_username": "nixos",
8484
"headless": true,
8585
"type": "hyperv-iso",
8686
"generation": 1,
87-
"iso_url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3443.ee90403e147/nixos-minimal-21.05.3443.ee90403e147-x86_64-linux.iso",
88-
"iso_checksum": "7fec8949043bca97c6930177af868532219aa4037017f2f6122094035eeafb1c",
87+
"iso_url": "https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-x86_64-linux.iso",
88+
"iso_checksum": "7cb910f01993cdbbaae87ab54e5317be28a268c0ef71f6c919ab759f2a9f00e2",
8989
"memory": "{{ user `memory` }}",
9090
"disk_size": "{{ user `disk_size` }}",
9191
"enable_secure_boot": false,
@@ -99,18 +99,18 @@
9999
"boot_command": [
100100
"echo http://{{ .HTTPIP }}:{{ .HTTPPort}} > .packer_http<enter>",
101101
"mkdir -m 0700 .ssh<enter>",
102-
"curl $(cat .packer_http)/install_rsa.pub > .ssh/authorized_keys<enter>",
102+
"curl $(cat .packer_http)/install_key.pub > .ssh/authorized_keys<enter>",
103103
"sudo systemctl start sshd<enter>"
104104
],
105105
"http_directory": "scripts",
106106
"shutdown_command": "sudo shutdown -h now",
107-
"ssh_private_key_file": "./scripts/install_rsa",
107+
"ssh_private_key_file": "./scripts/install_key",
108108
"ssh_port": 22,
109109
"ssh_username": "nixos",
110110
"headless": true,
111111
"type": "vmware-iso",
112-
"iso_url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3443.ee90403e147/nixos-minimal-21.05.3443.ee90403e147-x86_64-linux.iso",
113-
"iso_checksum": "7fec8949043bca97c6930177af868532219aa4037017f2f6122094035eeafb1c",
112+
"iso_url": "https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-x86_64-linux.iso",
113+
"iso_checksum": "7cb910f01993cdbbaae87ab54e5317be28a268c0ef71f6c919ab759f2a9f00e2",
114114
"memory": "{{ user `memory` }}",
115115
"disk_size": "{{ user `disk_size` }}",
116116
"guest_os_type": "Linux"
@@ -133,7 +133,7 @@
133133
"qemu",
134134
"hyperv-iso"
135135
],
136-
"output": "nixos-21.05-{{.Provider}}-x86_64.box"
136+
"output": "nixos-21.11-{{.Provider}}-x86_64.box"
137137
}
138138
]
139139
]

scripts/install_key

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-----BEGIN OPENSSH PRIVATE KEY-----
2+
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
3+
QyNTUxOQAAACC1xMAfsqkzJyaukX4ykynPCEtFTS+fLdd4duufnVuJUwAAAJDCDGZlwgxm
4+
ZQAAAAtzc2gtZWQyNTUxOQAAACC1xMAfsqkzJyaukX4ykynPCEtFTS+fLdd4duufnVuJUw
5+
AAAEC8f9HrVwq+PG/tyH3+7SjG600qHQ5rX6MWICc8w5RplrXEwB+yqTMnJq6RfjKTKc8I
6+
S0VNL58t13h265+dW4lTAAAAB2syc0BrMm4BAgMEBQY=
7+
-----END OPENSSH PRIVATE KEY-----

scripts/install_key.pub

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILXEwB+yqTMnJq6RfjKTKc8IS0VNL58t13h265+dW4lT [email protected]

scripts/install_rsa

Lines changed: 0 additions & 27 deletions
This file was deleted.

scripts/install_rsa.pub

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)