Config - ODEX-TOS/tos-installer-backend GitHub Wiki

When generating an installation (a shell script installing to a chroot environment) we use a few default commands that are present on most systems. However sometimes you need a custom command or a command that does something unique. There are 2 ways of getting to that goal. You could write a custom script and use that in the execution step. However that would replace must build in execution steps and is thus error prone. Alternatively you can use our config and alter it to suite your needs. To define a config script you can either call it config.yaml and it will automatically be sourced. Or you give it another name and add that file to the commandline arguments as such python main.py -c configfile where configfile is the name of your config file.

A full config file

You write a config file that doesn't use all these settings. But here is a full config file with all parameters

INSTALLCOMMAND: "pacman -Syu --noconfirm" # command to install software

IP: "8.8.8.8" # ip to check network connection
WIFI_CONNECT_COMMAND: "wifi-menu" # command to interactivally connect to the network
WIFI_CONNECT_COMMAND_WITH_PASSWORD: "nmcli device wifi connect '{}' password '{}'" # command to automaticaly connect to a network

DEFAULT_SHELL: "/bin/bash" # default shell for new users
USERADD: "useradd -m -p {} -g users -G {} -s {} {}" # command to add new users
MOUNTPOINT: "/mnt" # default mountpoint

# bootloader related commands
BOOTLOADER_EFI: "grub-install --efi-directory /boot/efi --force {}"
BOOTLOADER_DOS: "grub-install {}"
BOOTLOADER_CONFIG: "grub-mkconfig -o /boot/grub/grub.cfg"

# system settings
LOCAL: "en_US.UTF-8"
KEYMAP: "be-latin1"
HOSTNAME: "tos"
ROOT_PWD: "123"

CHROOT: "arch-chroot -u {} {}"

# encryption command
LUKS: "cryptsetup luksFormat -v -s 512 -h sha512 {} -d -"
LUKS_OPEN: "cryptsetup open {} luks_lvm -d -"
LUKS_NAME: "tos"
LUKS_DEVICE: "/dev/mapper/luks_lvm"

# fstab commands
FSTAB: "genfstab -U -p /mnt > /mnt/etc/fstab"

GROUPS:
  - audio
  - lp
  - optical
  - storage
  - video
  - wheel
  - games
  - power

HERESTRING: "EOF"

BOOTSTRAP: "pacstrap /mnt {} --noconfirm"

BOOTSTRAP_PACKAGES:
  - base
  - base-devel
  - efibootmgr
  - vim
  - dialog
  - grub

# an array of kernels to be installed on the system
# eg you can do both linux and linux-lts or something
LINUX:
  - linux

Don't be overwhelmed by all these settings. You don't need to know how all those settings work. These are just the default values our generator use. We will cover each of those settings seperatly