2012-12-24 19:02:03 -08:00
|
|
|
iso = {
|
2013-02-23 12:28:46 -08:00
|
|
|
:url => 'http://nixos.org/releases/nixos/nixos-0.2pre4476_a5e4432-b076ab9/nixos-minimal-0.2pre4476_a5e4432-b076ab9-i686-linux.iso',
|
|
|
|
:md5 => 'f035bb375f0fbcbbc4e33a12131e91d4',
|
2012-12-24 19:02:03 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
session = {
|
|
|
|
:boot_cmd_sequence =>
|
|
|
|
[
|
|
|
|
'<Enter>', '<Wait>'*15,
|
|
|
|
'root', '<Enter>',
|
2013-02-04 09:11:18 -08:00
|
|
|
'stop sshd', '<Enter>', # Make sure we don't accept connections until reboot
|
2012-12-24 19:02:03 -08:00
|
|
|
'fdisk /dev/sda', '<Enter>',
|
|
|
|
'n', '<Enter>'*5,
|
|
|
|
'a', '<Enter>',
|
|
|
|
'1', '<Enter>',
|
|
|
|
'w', '<Enter>',
|
|
|
|
'mkfs.ext4 -j -L nixos /dev/sda1', '<Enter>',
|
|
|
|
'mount LABEL=nixos /mnt', '<Enter>',
|
2013-02-04 09:32:43 -08:00
|
|
|
'nixos-option --install', '<Enter>',
|
|
|
|
'curl http://%IP%:%PORT%/configuration.nix > /mnt/etc/nixos/configuration.nix &&', '<Enter>',
|
2012-12-24 19:02:03 -08:00
|
|
|
'nixos-install &&', '<Enter>',
|
2013-02-04 08:56:42 -08:00
|
|
|
'reboot', '<Enter>',
|
2012-12-24 19:02:03 -08:00
|
|
|
],
|
|
|
|
:boot_wait => '5',
|
|
|
|
:cpu_count => '1',
|
|
|
|
:disk_format => 'VDI',
|
|
|
|
:disk_size => '20400',
|
|
|
|
:hostiocache => 'off',
|
|
|
|
:iso_download_timeout => '1000',
|
2013-02-23 12:28:46 -08:00
|
|
|
:iso_file => File.basename(iso[:url]),
|
2012-12-24 19:02:03 -08:00
|
|
|
:iso_md5 => iso[:md5],
|
2013-02-23 12:28:46 -08:00
|
|
|
:iso_src => iso[:url],
|
2012-12-24 19:02:03 -08:00
|
|
|
:kickstart_file => 'configuration.nix',
|
|
|
|
:kickstart_port => '7122',
|
|
|
|
:kickstart_timeout => '10000',
|
|
|
|
:memory_size => '256',
|
2013-02-04 09:33:45 -08:00
|
|
|
:os_type_id => 'Linux26',
|
2012-12-24 19:02:03 -08:00
|
|
|
:postinstall_files => [ 'postinstall.sh' ],
|
|
|
|
:postinstall_timeout => '10000',
|
|
|
|
:shutdown_cmd => 'shutdown -h now',
|
|
|
|
:ssh_guest_port => '22',
|
|
|
|
:ssh_host_port => '7222',
|
|
|
|
:ssh_key => '',
|
|
|
|
:ssh_login_timeout => '10000',
|
|
|
|
:ssh_password => 'vagrant',
|
|
|
|
:ssh_user => 'vagrant',
|
|
|
|
:sudo_cmd => "sudo '%f'"
|
|
|
|
}
|
|
|
|
|
|
|
|
Veewee::Definition.declare session
|