HorizonScript Keys
Introduction
A HorizonScript file is, at its core, a collection of values that determine the actions and configuration values used to transform a computer from an indeterminate state to a well-known state running Adélie Linux. These values are categorised into keys, which is a logical unit of a value.
This chapter defines and specifies for every valid key for a HorizonScript file: its name, its purpose, its format, and one or more example values with explanations.
Required Keys
Each key specified in this section is required to be present in a HorizonScript. If any key from this section is missing, the HorizonScript will be considered invalid and Horizon Runner will not execute it.
network
Name
network
Purpose
The network key determines if the target computer will support networking or not. If the value is true, the computer will support networking, and at least one netaddress key will then be required.
Format
The network key is a Boolean value — valid values are true and false. network must appear exactly once in a HorizonScript.
Example
The network Key
network true
This enables networking for the target computer.
hostname
Name
hostname
Purpose
The hostname key determines the hostname of the target computer. This key is always required, even when the target computer will not participate in a network. The computer's hostname is used on shell prompts, most window manager launchers, and in log files.
Format
The hostname key is a string value that must contain only alphanumeric characters and optionally one or more '.' characters. If hostname contains one or more '.' characters, all content before the first '.' is considered the hostname, and all content after the first '.' is considered the domain name. hostname must appear exactly once in a HorizonScript.
Examples
The hostname Key — Setting a Host Name
hostname gwyn
This sets the hostname of the target computer to gwyn.
The hostname Key — Setting a Host Name and Domain Name
hostname gwyn.foxkit.internal
This sets the hostname of the target computer to gwyn.foxkit.internal.
pkginstall
Name
pkginstall
Purpose
The pkginstall key lists the packages that will be installed on the target computer.
Format
The pkginstall key is a space-separated list of APK packages. They must be available in the repositories used during the installation process. pkginstall must appear at least once in a HorizonScript. There is no limit to the number of times pkginstall may be specified; each one will append to the list of packages to install.
Examples
The pkginstall Key — Simple Usage
pkginstall adelie-base-posix kde x11
This installs the adelie-base-posix, kde, and x11 packages on the target computer.
The pkginstall Key — Multiple Invocations
pkginstall adelie-base-posix
pkginstall x11 i3wm
pkginstall claws-mail
This installs the adelie-base-posix, x11, i3wm, and claws-mail packages on the target computer. This advanced usage may be useful if you use a templating engine to generate HorizonScript files.
rootpw
Name
rootpw
Purpose
The rootpw key provides the encrypted passphrase for the administrative root user on the machine.
Format
The rootpw key is a string value containing a crypt(3) style, SHA-512 or Blowfish hashed passphrase. It is invalid to provide a plaintext passphrase.
Example
The rootpw Key
rootpw $6$gumtLGmHwOVIRpQR$2M9PUO24hy5mofzWWf9a.YLbzOgOlUby1g0hDj.wG67E2wrrvys59fq02PPdxBdbgkLZFtjfEx6MHZwMBamwu/
This sets the target computer's root passphrase to "Test Password". (Please do not use this passphrase.)
Optional Keys
Each key specified in this section may be present in a HorizonScript. This section additionally defines the default value or action taken if the specified key is not present.
language
Name
language
Purpose
The language key determines the default natural language for the target computer. The value of this key will be used to configure the LANG and LC_ALL environment variables, in addition to installing language packs for certain software.
Format
The language key is a string value that specifies a valid locale code. A locale code must match one of the following formats: xx, or xx_YY, or xx_YY.UTF-8, where xx is a valid ISO 639-1 language code, and YY is a valid ISO 3166-1 country code. language may appear at most once in a HorizonScript.
Default
If the language key is not present, no setting will be defined for the LANG or LC_ALL environment variables. Most software treats this as either "C.UTF-8" or "en_US.UTF-8". No language packs will be installed for software that supports multiple language; due to English being the de facto language of software engineering, this implies all software will run in English.
Examples
The language Key — Simple Language
language cy
This sets the language of the target computer to Welsh.
The language Key — Language with Country Localisation
language fr_CA
This sets the language of the target computer to Canadian French.
keymap
Name
keymap
Purpose
The keymap key determines the keyboard layout used for input on the target computer.
Format
The keymap key is a string value that specifies the name of a keyboard layout. Valid keyboard layouts are listed in /etc/console-setup/ckb/rules/xorg.lst under the ! layout heading. keymap may appear at most once in a HorizonScript.
Default
If the keymap key is not present, the target computer will use the default keyboard settings from Linux. These settings are architecture-dependent, but almost universally use a US QWERTY-style layout.
Example
The keymap Key
keymap fr
This sets the keyboard layout of the target computer to French AZERTY.
firmware
Name
firmware
Purpose
The firmware key determines if the target computer will load potentially insecure, proprietary firmware.
Format
The firmware key is a Boolean value — valid values are true and false. firmware may appear at most once in a HorizonScript.
Default
If the firmware key is not present, the target computer will not load proprietary firmware. This is to ensure the integrity, security, and reliability of the target computer.
Example
The firmware Key
firmware false
This explicitly disables loading of firmware on the target computer.
netaddress
Name
netaddress
Purpose
The netaddress key determines the network configuration used on the target computer.
Format
The netaddress key is a space-separated list of network configuration information:
The kernel interface name. If the interface specified does not exist, the system will issue a soft error (logging the failure but attempting to continue with installation).
The addressing type. Valid values are dhcp for DHCP v4 and v6, slaac for IPv6 Stateless Automatic Address Configuration, and static for Administrator-specified addressing. The list must end here unless the address type specified is static. Any additional items constitute a configuration error and an invalid HorizonScript.
The IP address. The value specified must be a valid IPv4 or IPv6 address.
The prefix or network mask. The value must be either:
A whole number in the range of 1-32 for IPv4 addresses, or 1-64 for IPv6 addresses.
An IPv4 network mask, in the format octet.octet.octet.octet.
Optionally, the default gateway. The value specified must be a valid IP address of the same family as the IP address specified in item 3.
netaddress must not appear unless network is true. If network is true, then netaddress must appear at least once, and may appear up to 255 times per interface.
Default
There is no default for this key. It is invalid to enable networking and not provide at least one netaddress key.
Example
The netaddress Key — Simple DHCP
netaddress eth0 dhcp
This configures the target computer to use DHCP on interface eth0.
The netaddress Key — Static Addressing
netaddress eth0 2001:db8::1337 64 2001:db8::1
netaddress eth0 198.51.100.37 24 198.51.100.1
This configures the target computer to use the addresses 2001:db::1337/64 and 198.51.100.37/24 on interface eth0. The default gateways are 2001:db::1 and 198.51.100.1.
nameserver
Name
nameserver
Purpose
The nameserver key determines the DNS server used for name queries on the target computer.
Format
The nameserver key takes either an IPv4 address or IPv6 address. Any other value is invalid. The nameserver may appear up to four times in a HorizonScript, or be omitted. It is valid to specify nameserver even if network is false, but name queries will not function properly without a network configuration.
Default
If the nameserver key is not specified, name queries requiring the DNS will not succeed on the target computer.
Example
The nameserver Key
nameserver 2620:fe::fe
This configures the target computer to use Quad9's public resolver, 2620:fe::fe, for name queries.
netssid
Name
netssid
Purpose
The netssid key determines the wireless networking configuration on the target computer.
Format
The netssid is a space-separated list of wireless networking configuration information:
The kernel interface name. If the interface specified does not exist, the system will issue a soft error (logging the failure but attempting to continue with installation).
The SSID name to connect to. This must be a string value enclosed by ASCII double-quotes ("). System behaviour is undefined if the SSID name contains an ASCII double-quote.
The security type of the SSID. Valid values are none for an open access point, wep for a WEP passphrase, and wpa for a WPA pre-shared key (PSK).
If the security type is not none, the passphrase or pre-shared key. WPA PSKs may be specified in hexadecimal or as a raw string. The remainder of the line will be used verbatim.
Default
If the netssid key is not specified, no wireless network configuration will be present on the target computer.
Examples
The netssid Key — Open Network
netssid wlan0 "h" none
This configures the target computer to connect to the access point with name h, with no security.
The netssid Key — WEP Network
netssid wlan0 "Hophop" wep omgitsarabbit
This configures the target computer to connect to the access point with name Hophop, with the WEP passphrase omgitsarabbit.
The netssid Key — WPA2 Network
netssid wlan0 "The New Fox 5G" wpa shh sekrit
This configures the target computer to connect to the access point with name The New Fox 5G, with the WPA PSK shh sekrit.
timezone
Name
timezone
Purpose
The timezone key determines the local time zone on the target computer.
Format
The timezone key is a string value that must correspond with a valid zoneinfo time zone name. A list of valid time zone names may be found using the following command on any Adélie Linux computer: find /usr/share/zoneinfo. timezone may appear at most once in a HorizonScript.
Default
If the timezone key is not specified, the target computer will use UTC (Universal Coordinated Time) as its time zone.
Example
The timezone Key
timezone Africa/Nairobi
This configures the target computer to use East Africa Time, as observed in Nairobi, Kenya, for the local time zone.
repository
Name
repository
Purpose
The repository key specifies the location of an APK package repository to use on the target computer. This repository will be used for initial installation, and added to the /etc/apk/repository file on the target computer.
Format
The repository key is a string value which must describe either an absolute local path or a HTTP or HTTPS location on the network. repository may appear up to ten times in a HorizonScript, or be omitted.
Default
If the repository key is not specified, the default repositories for Adélie Linux will be used:
https://distfiles.adelielinux.org/adelie/$VERSION/system
https://distfiles.adelielinux.org/adelie/$VERSION/user
where $VERSION is the version of Adélie Linux being installed. Additionally, if the firmware key is specified and set to true, the https://distfiles.apkfission.net/adelie-$VERSION/nonfree repository will be added. If repository is specified, none of these repositories will be used unless manually specified.
Example
The repository Key
repository https://mirrors.servercentral.com/adelie/1.0/system
repository https://mirrors.servercentral.com/adelie/1.0/user
This configures the target computer to use the Server Central mirrors.
signingkey
Name
signingkey
Purpose
The signingkey key specifies a key to trust for APK package repositories.
Format
The signingkey key is a string value which must describe either an absolute local path or an HTTPS location on the network. It is not valid to use an HTTP connection for signingkey. signingkey may appear up to ten times in a HorizonScript, or be omitted.
Default
If the signingkey key is not specified, the Adélie Linux repository signing key will be used. Additionally, if the firmware key is specified and set to true, the APK Fission signing key will be used. If signingkey is specified, none of these signing keys will be trusted unless manually specified.
Example
The signingkey Key
signingkey /etc/apk/keys/packages@adelielinux.org.pub
signingkey https://packages/builder@ourcompany.net.pub
This configures the target computer to use the default Adélie Linux repository signing key, and also a repository signing key that is available for download from the URL https://packages/builder@ourcompany.net.pub.
username
Name
username
Purpose
The username key specifies a user account to create on the target computer.
Format
The username key is a string value, describing the user account's name. This name must be a valid Linux account name. username may be specified up to 255 times. It is invalid to specify the same account name more than once. It is invalid to specify the name of a system account.
Default
If no username key is specified, no user accounts will be created on the system beyond the built-in system accounts. Only root will be able to log in.
Examples
The username Key — Simple Usage
username awilfox
This creates an account with name awilfox on the target computer.
The username Key — Advanced Usage
username chris
username kayla
username meg
username steph
username amanada
This creates five accounts on the target computer.
useralias
Name
useralias
Purpose
The useralias key provides the friendly name or alias of a user account on the target computer.
Format
The useralias key is a space-separated tuple of two string values: the user account name, and the friendly name or alias to use. The friendly name is read to the end of the line and may contain spaces. useralias may appear up to once per username. It is invalid to specify more than one useralias for a given username. It is invalid to specify a useralias for an account that is not created by username.
Default
If no useralias key is specified for a username, the alias "Adélie User" will be used.
Examples
The useralias Key
useralias awilfox A. Wilcox
This sets the friendly name of the awilfox account to A. Wilcox.
userpw
Name
userpw
Purpose
The userpw key specifies the passphrase to use for a given user account on the target computer.
Format
The userpw key is a space-separated tuple of two string elements: the user account name, and the encrypted, SHA-512 or Blowfish hashed passphrase. It is invalid to specify a plaintext passphrase. userpw may appear up to once per username. It is invalid to specify more than one userpw for a given username. It is invalid to specify a userpw for an account that is not created by username.
Default
If no userpw key is specified for a username, it will have no passphrase set. By default, this will prevent users from logging in to the account.
Example
The userpw Key
userpw awilfox $6$UZJm/vBmVgyIdMZr$ppKEulz/HY0/e7RcXXujQbcqDXkUYgIqNEVPQJO6.le9kUpz8GvvRezY3ifqUUEwjhSo9tTOMG7lhqjn8gGpH0
This sets the passphrase of the awilfox account to My Passphrase. (Please do not use this passphrase.)
usericon
Name
usericon
Purpose
The usericon key specifies a icon used to identify a given user account on the target computer.
Format
The usericon key is a space-separated tuple of two string elements: the user account name, and a path to the icon. The icon must be in JPEG, PNG, TGA, or TIFF format. The path must be an absolute path accessible from the installation environment, or a supported URL. usericon may appear up to once per username. It is invalid to specify more than one usericon for a given username. It is invalid to specify a usericon for an account that is not created by username.
Default
If no usericon key is specified for a username, a default silhouette icon will be used for that account.
Example
The usericon Key
usericon awilfox /usr/share/user-manager/avatars/circles/Cat.png
This sets the icon of the awilfox account to the default Cat avatar.
usergroups
Name
usergroups
Purpose
The usergroups key specifies group membership for a given user account on the target computer.
Format
The usergroups key is a space-separated tuple of two string elements: the user account name, and a comma-separated list of groups of which the account should become a member. usergroups may appear at least once per username. Each usergroups key for a given username appends to an existing list, if any. It is invalid to specify the same group more than once for a given username. It is invalid to specify more than 16 groups for a given username across all usergroups specified for it.
Default
If no usergroups is specified for a given username, it will be added to the users group. If it is given, the users group must be explicitly specified if desired.
Examples
The usergroups Key — Simple Usage
usergroups awilfox users,wheel
This specifies that the awilfox account will become a member of the groups users and wheel on the target computer.
The usergroups Key — Advanced Usage
usergroups chris disk,lp,wheel,floppy,audio,cdrom,video,games,cdrw,usb,users
usergroups kayla lp,audio,cdrom,video,games,users
usergroups meg lp,audio,cdrom,video,games,users
usergroups steph lp,audio,cdrom,video,games,users
usergroups amanda lp,audio,cdrom,video,games,users
This specifies that the chris account will become an administrative account and have access to most peripherals of the system, while the rest will have access to printers, sound, optical storage, graphics, and the ability to play games.
Disk Partitioning Keys
This section describes the keys used for partitioning one or more hard disk drives using HorizonScript. Of these, only the mount key is required to be present in a valid HorizonScript.
Sizing
Purpose
All disk partitioning keys that take a size argument shall follow the format described in this section. There are three forms of valid size that may be specified.
Format #1: Block Size
Block sizing format is: number{K|M|G|T}. K, M, G, and T represent IEC binary prefixes; for example, "150G" would specify 150 GiB.
Format #2: Percentage
Percentage format is: number%, where number is a number from 1 to 100 inclusive. It is invalid to specify multiple partitions that would use more than 100% of a containing block device.
Format #3: Fill
The literal string fill specifies that the partition shall fill the remaining space of the containing block device. No partitions may come after one that specifies fill on the same containing block device.
diskid
Name
diskid
Purpose
The diskid key specifies a substring of a disk's identification string. The system matches this string to the specified block device's identification string to ensure that the proper disk is partitioned.
Format
The diskid key is a space-separated tuple of values that contains exactly two string elements: a valid block device file name, and the substring of its identification string. The second element is read to the end of the string, so it may contain further spaces. diskid may appear up to one time per block device file name. It is invalid to specify more than one diskid for the same block device.
Default
If the diskid key is not specified for a block device, the system will not be able to verify that the block device is the intended target of partitioning commands.
Examples
The diskid Key — Verify Manufacturer of Hard Disk
diskid /dev/sda HITACHI
This ensures that the identification string of the disk at /dev/sda contains the string 'HITACHI'.
The diskid Key — Verify Model of NVMe Device
diskid /dev/nvme0n1 WDC WDS512G1X0C-00ENX0
This ensures that the identification string of the NVMe device at /dev/nvme0n1 contains the string 'WDC WDS512G1X0C-00ENX0'.
disklabel
Name
disklabel
Purpose
The disklabel key specifies the type of partitioning a disk will use.
Format
The disklabel key is a space-separated tuple of values that contains exactly two string elements: a valid block device file name, and the type of disk label to use. Valid disk labels are:
mbr — Master Boot Record (MBR)
gpt — GUID Partition Table (GPT)
apm — Apple Partition Map (APM)
disklabel may appear up to once per block device file name. It is invalid to specify more than one disklabel for the same block device.
Default
If the disklabel key is not specified for a block device, the existing disk label will be used. If no disk label is currently written to the device, the device will not contain a disk label.
Examples
The disklabel Key — Simple Usage
disklabel /dev/sda mbr
This erases any present disk label on the block device at /dev/sda and creates a new MBR disk label.
The disklabel Key — Multiple Disks
disklabel /dev/sda apm
disklabel /dev/sdb gpt
disklabel /dev/nvme0n1 gpt
This erases any present disk labels on the block devices /dev/sda, /dev/sdb, and /dev/nvme0n1. The system will then create a new APM disk label on /dev/sda, and new GPT disk labels on each of /dev/sdb and /dev/nvme0n1. This example would allow you to use mass storage (greater than 2 TB) on a Power Mac G5 while retaining OpenFirmware boot compatibility on the first disk.
partition
Name
partition
Purpose
The partition key specifies a new partition to be created on a block device.
Format
The partition key is a space-separated tuple of values that contains either three or four elements: a valid block device file name, the partition number to create, the size of the new partition as specified in , and optionally a type code for the partition. Valid type codes are:
boot — Marks the partition as bootable. On MBR disk labels, this enables the Bootable flag. On APM disk labels, this sets the partition type to Apple_Bootstrap. On GPT disk labels, this sets the partition's type to BIOS Boot.
esp — Marks the partition as an EFI System Partition (ESP). This type is only valid on GPT disk labels.
partition may appear many times per block device file name; the exact maximum depend on the disk label in use on the block device. It is invalid to specify a partition for a partition number that already exists on the block device. It is invalid to specify a partition for a block device that does not have a disk label supported by Horizon.
Default
If no partition key is specified for a given block device, then the partition table on that block device is not modified.
Examples
The partition Key — Simple Usage
partition /dev/sda 1 40M boot
partition /dev/sda 2 fill
This configures /dev/sda to contain a 40 MiB boot partition, and uses the rest of the disk as a single data partition.
The partition Key — Advanced Usage
partition /dev/sda 1 1G boot
partition /dev/sda 2 20%
partition /dev/sda 3 40%
partition /dev/sda 4 fill
This configures /dev/sda to contain a 1 GiB boot partition, a second partition using 20% of the disk's total size, a third partition using 40% of the disk's total size, and a fourth partition that utilises the rest of the disk.
lvm_pv
Name
lvm_pv
Purpose
The lvm_pv key specifies a block device to use as a LVM physical volume.
Format
The lvm_pv key is a string value which must describe a path to a valid block device. This is typically either a whole disk or a partition on a disk. lvm_pv may be specified up to once per block device specification. If an lvm_pv key is specified for both a block device and an underlying partition already extant on the block device, system behaviour is undefined.
Default
If no lvm_pv key is specified, no LVM physical volume will be created by the system.
Examples
The lvm_pv Key — Whole Disk LVM
lvm_pv /dev/sda
This configures the entire block device at /dev/sda to be an LVM physical volume. Any existing data on the specified disk will be destroyed.
The lvm_pv Key — LVM Partition
disklabel /dev/sda apm
partition /dev/sda 1 4M boot
partition /dev/sda 2 fill
lvm_pv /dev/sda2
This configures the block device at /dev/sda with a new GPT disk label, creates a 4 MiB BIOS Boot partition, and then uses the rest of the disk as an LVM physical volume.
lvm_vg
Name
lvm_vg
Purpose
The lvm_vg key specifies parameters for creating a new LVM volume group on the target computer.
Format
The lvm_vg key is a space-separated tuple of exactly two string values: a path to a valid block device containing an LVM physical volume, and a valid LVM volume group name. A volume group will be created on the specified LVM physical volume with the specified name. It is invalid to specify a block device that does not contain an LVM physical volume.
Default
If no lvm_vg key is specified, no LVM volume groups will be created on the target computer.
Example
The lvm_vg Key
lvm_vg /dev/sda2 elaine
This creates a new LVM volume group named elaine on the LVM physical volume /dev/sda2.
lvm_lv
Name
lvm_lv
Purpose
The lvm_lv key specifies parameters for creating a new LVM logical volume on the target computer.
Format
The lvm_lv key is a space-separated tuple of exactly three values: the name of an extant LVM volume group, the name of the LVM logical volume to create, and the size of the new LVM logical volume as specified in . The name of the new LVM logical volume must be a valid logical volume name. It is invalid to specify a logical volume size larger than the available space in the volume group.
Default
If no lvm_lv key is specified, no LVM logical volumes will be created on the target computer.
Examples
The lvm_lv Key
lvm_lv elaine root fill
This creates a new LVM logical volume named root on the LVM volume group elaine, using all available space in the volume group.
encrypt
Name
encrypt
Purpose
The encrypt key specifies block devices to encrypt with LUKS.
Format
The encrypt key has two forms. The first form is a string value which must be a path to a valid block device. The second form is a tuple of two string values which are a path to a valid block device, and the passphrase to use to encrypt the volume.
The passphrase to encrypt the volume should not be provided if a non-encrypted network transport is used to transfer the HorizonScript to the target computer. This could expose the passphrase to attackers.
The passphrase will be read to the end of the line, so it may contain spaces if desired.
If no passphrase is specified, the system will interactively prompt for a passphrase during the installation. There is no time out for entering a passphrase.
encrypt may be specified up to once per block device. It is invalid to specify an encrypt key more than once for the same block device.
Default
If no encrypt key is specified, no LUKS containers will be created. If no passphrase is specified in an encrypt key, the system will interactively prompt for one.
Examples
The encrypt Key — Prompt for Passphrase
encrypt /dev/elaine/root
This configures the block device at /dev/elaine/root to use LUKS, and prompts the installing technician for a passphrase.
The encrypt Key — Use Plaintext Passphrase
encrypt /dev/elaine/home oh. so. secret.
This configures the block device at /dev/elaine/home to use LUKS with the passphrase oh. so. secret. in plaintext.
fs
Name
fs
Purpose
The fs key specifies file systems to create on the target computer.
Format
The fs key is a space-separated tuple of two string elements: a path to a valid block device, the type of file system to use Valid file systems are:
ext2 — The ext2 file system, a non-journaled Linux filesystem.
ext3 — The ext3 file system, a journaled Linux filesystem.
ext4 — The ext4 file system, a journaled Linux filesystem.
hfs+ — The HFS Plus file system, a non-journaled filesystem from Apple used for boot partitions on Macintosh computers.
jfs — The JFS file system, a journaled filesystem from IBM.
xfs — The XFS file system, a journaled filesystem orginally developed by SGI.
vfat — The FAT32 file system, a non-journaled filesystem used for EFI System Partitions on computers with EFI firmware.
swap — Swap space, used for virtual memory.
fs may be specified up to once per block device. It is invalid to specify fs more than once for the same block device.
Default
If no fs key is specified, no file systems will be created on the target computer.
Examples
The fs Key
fs /dev/elaine/root ext4
fs /dev/elaine/home xfs
This creates a new ext4 file system on the block device at /dev/elaine/root, and creates a new XFS file system on /dev/elaine/home.
mount
Name
mount
Purpose
The mount key describes the filesystems and mountpoints to use on the target computer.
Format
The mount key is a space-separated tuple of two or three string elements: a path to a valid block device, the mountpoint on the target computer, and optionally mounting options. The mountpoint must start with /. Valid mounting options depend on the file system chosen, but typically include options such as noatime, user, and so on. See the mount manpage for the file system you are using for more information on mounting options. Mounting options are separated with commas. Mounting options will be used in the installation environment and additionally saved to the target computer's /etc/fstab file.
mount must be specified at least once, for the root (/) partition. It is invalid to specify mount more than once for the same block device. It is invalid to specify mount more than once for the same mountpoint.
Examples
The mount Key
mount /dev/elaine/root /
mount /dev/elaine/home /home noquota,wsync
The filesystem at /dev/elaine/root will be mounted at /. The filesystem at /dev/elaine/home will be mounted at /home, with the noquota and wsync options.