diff --git a/distros/opensuse/16.0/amd64.pkrvars.hcl b/distros/opensuse/16.0/amd64.pkrvars.hcl new file mode 100644 index 0000000..b905ff0 --- /dev/null +++ b/distros/opensuse/16.0/amd64.pkrvars.hcl @@ -0,0 +1,16 @@ +distro = "opensuse" +version = "16.0" +iso = { + url = "https://download.opensuse.org/distribution/leap/16.0/installer/iso/agama-installer-Leap.x86_64-16.0.0-Leap-Build49.1.iso" + checksum = "e930c07476556481fbe15c1e471c20a04bb06f3daea6e2431b0a77a852261dc9" +} +boot_command = [ + "e", + "", + "", + " agama.auto=http://{{ .HTTPIP }}:{{ .HTTPPort }}/profile.jsonnet", + "x" +] +boot_wait = "8s" +http_directory = "distros/opensuse/16.0/http/" +vbox_os_type = "OpenSUSE_Leap_64" diff --git a/distros/opensuse/16.0/finalize.sh b/distros/opensuse/16.0/finalize.sh new file mode 100644 index 0000000..b29f91f --- /dev/null +++ b/distros/opensuse/16.0/finalize.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -ex + +zypper clean -a \ No newline at end of file diff --git a/distros/opensuse/16.0/http/autoinst.xml b/distros/opensuse/16.0/http/autoinst.xml new file mode 100644 index 0000000..65753c6 --- /dev/null +++ b/distros/opensuse/16.0/http/autoinst.xml @@ -0,0 +1,125 @@ + + + + + + + false + true + + + + + wheel + vagrant + + + vagrant + vagrant + + + + true + external + + + public + + eth0 + + + ssh + + + + + + + all + + + /boot + 512MiB + + + / + max + + + + + + en_US + + + network_manager + + + + + sshd + + + + + + openssh + sudo + + true + false + + + UTC + UTC + + + + root + vagrant + false + + + vagrant + vagrant + false + + + + + + + + + + /etc/sudoers.d/vagrant + + + + 440 + root + + + /home/vagrant/.ssh/authorized_keys + 600 + vagrant + https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub + + + \ No newline at end of file diff --git a/distros/opensuse/16.0/http/profile.jsonnet b/distros/opensuse/16.0/http/profile.jsonnet new file mode 100644 index 0000000..c21f3ab --- /dev/null +++ b/distros/opensuse/16.0/http/profile.jsonnet @@ -0,0 +1,101 @@ +// This is a Jsonnet file. Please, check https://jsonnet.org/ for more +// information about the language. +// For the schema, see +// https://github.com/openSUSE/agama/blob/master/rust/agama-lib/share/profile.schema.json + +// The "hw.libsonnet" file contains hardware information from the "lshw" tool. +// Agama generates this file at runtime by running (with root privileges): +// +// lshw -json +// +// There are included also helpers to search this hardware tree. To see helpers check +// "/usr/share/agama-cli/agama.libsonnet" +local agama = import 'hw.libsonnet'; + +// Find the biggest disk which is suitable for installing the system. +local findBiggestDisk(disks) = + local sizedDisks = std.filter(function(d) std.objectHas(d, 'size'), disks); + local sorted = std.sort(sizedDisks, function(x) -x.size); + sorted[0].logicalname; + +// Find how much physical memory system has. +local memory = agama.findByID(agama.lshw, 'memory').size; + +{ + product: { + id: 'Leap_16.0', + }, + software: { + patterns: [ + ], + }, + user: { + fullName: 'vagrant', + userName: 'vagrant', + password: 'vagrant', + }, + root: { + password: 'vagrant', + }, + localization: { + language: 'en_US', + keyboard: 'us', + }, + storage: { + boot: { + configure: true, + device: findBiggestDisk(agama.selectByClass(agama.lshw, 'disk')), + }, + drives: [{ + search: findBiggestDisk(agama.selectByClass(agama.lshw, 'disk')), + ptableType: 'gpt', + partitions: [{ + search: '*', + delete: true + },{ + id: 'esp', + size: '512 MiB', + filesystem: { + type: 'vfat', + path: '/boot', + mountBy: 'label', + label: 'boot', + mountOptions: [ "noatime" ] + }, + },{ + id: 'linux', + size: { + min: '9 GiB', + }, + filesystem: { + type: 'ext4', + path: '/', + mountBy: 'label', + label: 'root', + mountOptions: [ "noatime" ] + } + }] + }] + }, + scripts: { + pre: [], + post: [ { + name: 'configure-vagrant', + body: ||| + # Configure the insecure Vagrant SSH key + mkdir -p /home/vagrant/.ssh + curl -o /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub + chown -R vagrant /home/vagrant/.ssh + chmod 600 /home/vagrant/.ssh + # Start services + systemctl enable sshd + # Configure sudo access for the vagrant user + cat < EOF > /etc/sudoers/sudoers.d/00_vagrant + Defaults:vagrant !requiretty + vagrant ALL=(ALL) NOPASSWD: ALL + root ALL=(ALL) NOPASSWD: ALL + EOF + ||| + } ] + }, +} diff --git a/distros/opensuse/16.0/qemu.sh b/distros/opensuse/16.0/qemu.sh new file mode 100644 index 0000000..8bc20c1 --- /dev/null +++ b/distros/opensuse/16.0/qemu.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -ex + +zypper install -y qemu-guest-agent +systemctl start qemu-guest-agent +systemctl enable qemu-guest-agent diff --git a/distros/opensuse/16.0/virtualbox.sh b/distros/opensuse/16.0/virtualbox.sh new file mode 100644 index 0000000..087d718 --- /dev/null +++ b/distros/opensuse/16.0/virtualbox.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +set -ex \ No newline at end of file diff --git a/distros/opensuse/16.0/vmware.sh b/distros/opensuse/16.0/vmware.sh new file mode 100644 index 0000000..4cfad53 --- /dev/null +++ b/distros/opensuse/16.0/vmware.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +set -ex diff --git a/distros/opensuse/default.nix b/distros/opensuse/default.nix index d8245ba..d44b945 100644 --- a/distros/opensuse/default.nix +++ b/distros/opensuse/default.nix @@ -6,6 +6,10 @@ version = "15.6"; arch = "amd64"; eol = false; +} { + version = "16.0"; + arch = "amd64"; + eol = true; # Not yet released, and bugged at the moment } { version = "tumbleweed"; arch = "amd64";