# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
# Unpack a filesystem. Supported ways to "pack" the filesystem are:
#   - fsarchiver in *savedir/restdir* mode (directories, not block devices)
#   - squashfs
#
# Configuration:
#
#   from globalstorage: rootMountPoint
#   from job configuration: the item to unpack
#

---
# This module is configured a lot like the items in the *unpackfs*
# module, but with only **one** item. Use multiple instances for
# unpacking more than one filesystem.
#
# There are the following **mandatory** keys:
#   - *source* path relative to the live / intstalling system to the image
#   - *sourcefs* the type of the source files; valid entries are
#       - `none` (this entry is ignored; kind of useless)
#       - `fsarchiver`
#         Aliases of this are `fsarchive`, `fsa` and `fsa-dir`. Uses
#         fsarchiver in "restdir" mode.
#       - `fsarchiver-block`
#         Aliases of this are `fsa-block` and `fsa-fs`. Uses fsarchiver
#         in "restfs" mode.
#       - `squashfs`
#         Aliases of this are `squash` and `unsquash`.
#       - `tar`
#   - *destination* path relative to rootMountPoint (so in the target
#       system) where this filesystem is unpacked. It may be an
#       empty string, which effectively is / (the root) of the target
#       system.
#
#
# There are the following **optional** keys:
#   - *condition* sets a dynamic condition on unpacking the item in
#     this job. This may be true or false (constant) or name a globalstorage
#     value. Use '.' to separate parts of a globalstorage name if it is nested.
#     Remember to quote names.
#
#     A condition is used in e.g. stacked squashfses, where the user can select
#     a specific install type. The default value of *condition* is true.



source: "/run/archiso/bootmnt/arch/x86_64/airootfs.sfs"
sourcefs: "squashfs"
destination: ""
# condition: true

source: "/run/archiso/bootmnt/arch/boot/x86_64/vmlinuz-linux-cachyos"
sourcefs: "file"
destination: "/boot/vmlinuz-linux-cachyos"
# condition: true
