diff --git a/iso/files/usr/lib/systemd/system-preset/90-fluffy-pancake-firstboot.preset b/iso/files/usr/lib/systemd/system-preset/90-fluffy-pancake-firstboot.preset new file mode 100644 index 0000000..ced0dcc --- /dev/null +++ b/iso/files/usr/lib/systemd/system-preset/90-fluffy-pancake-firstboot.preset @@ -0,0 +1 @@ +enable fluffy-pancake-firstboot.service diff --git a/iso/files/usr/lib/systemd/system/fluffy-pancake-firstboot.service b/iso/files/usr/lib/systemd/system/fluffy-pancake-firstboot.service new file mode 100644 index 0000000..d504c15 --- /dev/null +++ b/iso/files/usr/lib/systemd/system/fluffy-pancake-firstboot.service @@ -0,0 +1,13 @@ +[Unit] +Description=Fluffy Pancake First Boot Initialization +ConditionFirstBoot=yes +After=network-online.target +Wants=network-online.target + +[Service] +Type=oneshot +ExecStart=/usr/libexec/fluffy-pancake/firstboot.sh +RemainAfterExit=yes + +[Install] +WantedBy=first-boot-complete.target diff --git a/iso/files/usr/libexec/fluffy-pancake/firstboot.sh b/iso/files/usr/libexec/fluffy-pancake/firstboot.sh new file mode 100755 index 0000000..7724e90 --- /dev/null +++ b/iso/files/usr/libexec/fluffy-pancake/firstboot.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -euo pipefail + +echo "[fluffy-pancake-firstboot] starting" + +if systemctl list-unit-files | grep -q '^brew-setup.service'; then + systemctl start brew-setup.service || true +fi + +if systemctl list-unit-files | grep -q '^flatpak-add-fedora-repos.service'; then + systemctl start flatpak-add-fedora-repos.service || true +fi + +echo "[fluffy-pancake-firstboot] done" diff --git a/iso/iso.toml b/iso/iso.toml index c01fe0f..d1dceec 100644 --- a/iso/iso.toml +++ b/iso/iso.toml @@ -24,3 +24,15 @@ enable = [ disable = [ "org.fedoraproject.Anaconda.Modules.Subscription" ] + +[[customizations.files]] +path = "/files/usr/lib/systemd/system/fluffy-pancake-firstboot.service" +destination = "/usr/lib/systemd/system/fluffy-pancake-firstboot.service" + +[[customizations.files]] +path = "/files/usr/libexec/fluffy-pancake/firstboot.sh" +destination = "/usr/libexec/fluffy-pancake/firstboot.sh" + +[[customizations.files]] +path = "/files/usr/lib/systemd/system-preset/90-fluffy-pancake-firstboot.preset" +destination = "/usr/lib/systemd/system-preset/90-fluffy-pancake-firstboot.preset"