-
Notifications
You must be signed in to change notification settings - Fork 6
/
guix-vm.json
120 lines (120 loc) · 3.9 KB
/
guix-vm.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
"builders": [
{
"boot_command": [
"<enter><wait1s>",
"<end><wait1s><up><wait1s><up><wait1s><up><wait1s><enter><wait1s>",
"<down><wait1s>",
"<enter><wait1s>",
"<enter><wait1s>",
"passwd root<enter>password<enter>password<enter>",
"guix package -i openssh<enter>",
"herd start ssh-daemon<enter>"
],
"boot_wait": "5m",
"boot_keygroup_interval": "2s",
"guest_os_type": "Linux26_64",
"guest_additions_mode": "disable",
"headless": true,
"iso_checksum": "sha256:f2b30458fa1736eeee3b82f34aab1d72f3964bef0477329bb75281d2b7bb6d4b",
"iso_url": "https://ftp.gnu.org/gnu/guix/guix-system-install-1.3.0.x86_64-linux.iso",
"memory": 4096,
"shutdown_command": "shutdown",
"ssh_password": "password",
"ssh_timeout": "10m",
"ssh_username": "root",
"type": "virtualbox-iso",
"vm_name": "guixsd",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--recordingfile", "capture.webm"],
["modifyvm", "{{.Name}}", "--recordingscreens", "0"],
["modifyvm", "{{.Name}}", "--recording", "on"]
]
}
],
"min_packer_version": "1.4.0",
"post-processors": [
{
"keep_input_artifact": true,
"output": "guixsd_{{.Provider}}.box",
"type": "vagrant"
}
],
"provisioners": [
{
"inline": [
"wget -O vagrant.pub https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub"
],
"type": "shell-local"
},
{
"inline": [
"parted -s --align=none /dev/sda mktable gpt mkpart primary ext2 0 2MB mkpart primary ext2 2MB 100% set 1 bios_grub on",
"mkfs.ext4 -L my-root /dev/sda2",
"mount LABEL=my-root /mnt",
"herd start cow-store /mnt",
"mkdir /mnt/etc"
],
"type": "shell"
},
{
"destination": "/mnt/etc/config.scm",
"source": "bare-bones.scm",
"type": "file"
},
{
"inline": [
"guix system init /mnt/etc/config.scm /mnt"
],
"max_retries": 3,
"type": "shell"
},
{
"type": "shell-local",
"inline": [
"VBoxManage guestproperty enumerate guixsd"
]
},
{
"expect_disconnect": true,
"inline": [
"reboot"
],
"type": "shell"
},
{
"type": "shell-local",
"inline": [
"VBoxManage guestproperty enumerate guixsd"
]
},
{
"destination": "/tmp/vagrant.pub",
"generated": true,
"pause_before": "2m",
"source": "vagrant.pub",
"type": "file"
},
{
"destination": "/tmp/channels.scm",
"source": "channels.scm",
"type": "file"
},
{
"inline": [
"mkdir /home/vagrant/.ssh/",
"mv /tmp/vagrant.pub /home/vagrant/.ssh/authorized_keys",
"chmod 700 /home/vagrant/.ssh",
"chmod 600 /home/vagrant/.ssh/authorized_keys",
"chown -R vagrant:users /home/vagrant/.ssh",
"mkdir -p ~/.config/guix",
"mv /tmp/channels.scm ~/.config/guix",
"guix pull",
"guix system reconfigure /etc/config.scm",
"guix system delete-generations",
"guix gc"
],
"type": "shell"
}
]
}