---
modules-search: [/etc/calamares/modules, /usr/lib/calamares/modules]

# Second shellprocess instance: copies the live kernel into the target /boot
# (archiso keeps it out of the squashfs) before the bootloader step runs.
# Third: resolves the live squashfs's real location before unpackfs runs —
# copytoram unmounts /run/archiso/bootmnt, so a hardcoded path there can point
# at nothing depending on how the medium was booted.
instances:
- id: kernel
  module: shellprocess
  config: shellprocess-kernel.conf
- id: resolve-source
  module: shellprocess
  config: shellprocess-resolve-source.conf

sequence:
  - show:
    - welcome
    - locale
    - keyboard
    - partition
    - users
    - summary
  - exec:
    - partition
    - mount
    - shellprocess@resolve-source
    - unpackfs
    - machineid
    - fstab
    - locale
    - keyboard
    - localecfg
    - users
    - networkcfg
    - hwclock
    # packages module removed: it set update_db:true with no
    # skip_if_no_internet/ignore_update_db_error, so an offline install (the
    # exact case bos-welcome's nmtui step exists for) aborted here with a
    # fatal pacman -Sy failure. Its only try_install packages (pipewire-pulse,
    # pipewire-alsa) are already in packages.x86_64 and installed by
    # unpackfs, so the step did nothing useful even when it succeeded.
    # archiso strips the kernel from the squashfs; stage it, drop the archiso
    # initramfs config, and write a stock mkinitcpio preset before initcpio runs.
    - shellprocess@kernel
    # plymouthcfg sets the boot-splash theme and flags plymouth in use, so
    # initcpiocfg adds the plymouth hook to the initramfs that initcpio builds.
    - plymouthcfg
    # Native initramfs generation (works reliably here). The native `bootloader`
    # and `grubcfg` modules do NOT — in this archiso layout they leave the ESP
    # empty and abort the install, so GRUB is installed explicitly in
    # post-install.sh instead (grub-install --removable + NVRAM + grub-mkconfig,
    # the sequence verified to produce a bootable system).
    - initcpiocfg
    - initcpio
    # BOS finalization: GRUB install + cleanup + snapper + services + dotfiles.
    # All fast, and runs after initcpio so /boot has the kernel + initramfs.
    - shellprocess
    - umount
  - show:
    - finished

branding: bos
prompt-install: true
dont-chroot: false
oem-setup: false
disable-cancel: false
disable-cancel-during-exec: true
