# mkosi-generic.conf

[Config]
Profiles=generic,core,commonparts,vfat

[Content]
Bootable=no
Packages=kernel,grub2-efi,grub2-tools,grubby,grub2-common,grub-redpesk,dracut-redpesk-common
PostInstallationScripts=scripts/postinstall/50-kernelinstall-generic.sh.chroot

[Build]
Environment=REDPESK_BSP=redpesk-bsp
Environment=KERNEL_CMDLINE_EXTRA='cgroup_no_v1=all systemd.unified_cgroup_hierarchy=1 rw rootwait security=smack loglevel=7 fsck.mode=skip'
Environment=KERNEL_INSTALL_BYPASS=0

[Output]
RepartDirectories=repart.d/generic


### IMAGE: default
# mkosi.conf.d/common-parts.conf
[Output]
RepartDirectories=repart.d/common

[Match]
Profiles=commonparts

# mkosi.conf.d/core.conf
[Config]
Profiles=core

[Content]
Packages=dnf,iproute,vim-minimal,openssh-server

[Match]
Profiles=|core

# mkosi.conf.d/default-disk.conf
[Config]
Profiles=core

[Include]
Include=mkosi.conf.d/core.conf

[Content]
FinalizeScripts=scripts/finalize/50-manifest.sh
PostInstallationScripts=scripts/postinstall/50-binding-firstboot.sh.chroot
FinalizeScripts=scripts/finalize/50-boot.sh
PostOutputScripts=scripts/postoutput/99-redpesk.sh

[Output]
Format=disk
OutputDirectory=output

[Match]
Profiles=|core

# mkosi.conf.d/core.conf
[Config]
Profiles=core

[Content]
Packages=dnf,iproute,vim-minimal,openssh-server

[Match]
Profiles=|core

# mkosi.conf.d/default.conf
[Content]
RemoveFiles=/etc/yum.repos.d/mkosi.repo
RootPassword=root

# default redpesk OS features
Locale=C.UTF-8
Timezone=Europe/Paris
Keymap=fr
PostInstallationScripts=scripts/postinstall/10-import-gpgkeys.sh.chroot

[Distribution]
Distribution=rocky
Release=9

[Validation]
Checksum=yes

[Build]
Environment=SYSTEMD_LOG_LEVEL=debug

# mkosi.conf.d/generic-x86-64.conf
[Config]
Profiles=generic

[Content]
Packages=grub2-efi-x64,grub2-efi-x64-modules,shim-x64

[Match]
Profiles=|generic
Architecture=x86-64

# mkosi.conf.d/helloworld-binding.conf
[Config]
Profiles=afb

[Include]
Include=mkosi.conf.d/afb.conf

[Build]
Environment=REDPESK_BINDING_LIST=helloworld-binding
WithNetwork=yes

[Content]
Packages=platform-firstboot

[Match]
Profiles=|helloworld-binding
Profiles=|minimal

# mkosi.conf.d/afb.conf
[Config]
Profiles=afb

[Include]
Include=mkosi.conf.d/afb-smack.conf
Include=mkosi.conf.d/afb-selinux.conf

[Content]
Packages=afb-app-manager,afb-app-manager-rpm,afb-binder
FinalizeScripts=scripts/finalize/50-afb-fix.sh.chroot

[Match]
Profiles=|afb



# mkosi.conf.d/afb-smack.conf
[Content]
Packages=sec-lsm-manager-smack

[TriggerMatch]
Profiles=smack
Profiles=afb

# mkosi.conf.d/minimal.conf
[Config]
Profiles=minimal
Profiles=core
Profiles=helloworld-binding

[Include]
Include=mkosi.conf.d/afb.conf
Include=mkosi.conf.d/core.conf
Include=mkosi.conf.d/helloworld-binding.conf

[Content]
Packages=NetworkManager,vim,wget,tar

[Match]
Profiles=minimal

# mkosi.conf.d/helloworld-binding.conf
[Config]
Profiles=afb

[Include]
Include=mkosi.conf.d/afb.conf

[Build]
Environment=REDPESK_BINDING_LIST=helloworld-binding
WithNetwork=yes

[Content]
Packages=platform-firstboot

[Match]
Profiles=|helloworld-binding
Profiles=|minimal

# mkosi.conf.d/smack.conf
[Content]
Packages=sec-smack-rules

[Match]
Profiles=smack

# mkosi.conf.d/vfat.conf
[Config]
ConfigureScripts=scripts/configure/50-fix-fstab.sh

[Build]
Environment=SYSTEMD_REPART_MKFS_OPTIONS_VFAT="-S 512 -F 32"

[Match]
Profiles=vfat


