-
Notifications
You must be signed in to change notification settings - Fork 1
/
nixos.json
63 lines (53 loc) · 2.32 KB
/
nixos.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
"builders": [
{
"type": "vsphere-iso",
"vcenter_server": "{{user `vcenter_server`}}",
"username": "{{user `username`}}",
"password": "{{user `password`}}",
"insecure_connection": "true",
"vm_name": "nixos-template",
"datastore": "{{user `datastore`}}",
"folder": "{{user `folder`}}",
"host": "{{user `host`}}",
"convert_to_template": "true",
"cluster": "{{user `cluster`}}",
"network": "{{user `network`}}",
"firmware": "efi",
"boot_order": "disk,cdrom",
"boot_wait": "60s",
"guest_os_type": "other4xLinux64Guest",
"ssh_username": "{{user `ssh_username`}}",
"ssh_private_key_file": "{{user `ssh_key`}}",
"CPUs": 4,
"RAM": 2048,
"RAM_reserve_all": false,
"disk_controller_type": "pvscsi",
"disk_size":6144,
"disk_thin_provisioned": true,
"network_card": "vmxnet3",
"iso_paths": "[ssd] nixos-minimal-20.03.1782.210d8624ac4-x86_64-linux.iso",
"iso_checksum": "576fb7cc5d10e76dc4eff3e65c2da7f41dcd9b01590872b085a1bd5f7d9cd5a9",
"iso_checksum_type": "sha256",
"http_directory": "config",
"shutdown_command": "sudo rm -r /var/lib/zerotier-one/ && sudo shutdown now",
"boot_command": [
"sudo su<enter><wait>",
"parted /dev/sda -- mklabel gpt<enter><wait>",
"parted /dev/sda -- mkpart primary 2048MiB 100%<enter><wait>",
"parted /dev/sda -- mkpart primary linux-swap 512MiB 2048MiB<enter><wait>",
"parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB<enter><wait>",
"parted /dev/sda -- set 3 boot on<enter><wait>",
"mkfs.ext4 -L nixos /dev/sda1<enter><wait>",
"mkswap -L swap /dev/sda2<enter><wait>",
"mkfs.fat -F 32 -n boot /dev/sda3<enter><wait>",
"mount /dev/disk/by-label/nixos /mnt<enter><wait>",
"mkdir -p /mnt/boot<enter><wait>",
"mount /dev/disk/by-label/boot /mnt/boot<enter><wait>",
"mkdir -p /mnt/etc/nixos<enter><wait>",
"curl http://{{ .HTTPIP }}:{{ .HTTPPort }}/configuration.nix > /mnt/etc/nixos/configuration.nix<enter><wait>",
"nixos-install --no-root-passwd && reboot<enter>"
]
}
]
}