Simple script that allows to create and use Systemd extensions with specified packages for Fedora (>=41, dnf5 required), avoiding to deal with Fedora Atomic rpm-ostree layering.
This script relies on Nushell, which can be easly installed with brew:
$ brew install nushellWarning
- THIS SCRIPT IS IN EARLY STAGES. Use at your own risk
- Do not deactivate systemd extensions if its being used by critical programs installed in it (Desktop Enviroments, databases, etc).
We will install Docker in an extension as an example.
First we download dnf5-sysext.nu and add execution permissions.
$ git clone https://github.com/Zeglius/dnf5-sysext.sh.git
$ cd dnf5-sysext.sh
$ chmod +x ./dnf5-sysext.nuTry to execute it to see if is working
./dnf5-sysext.nu --helpWe copy docker repo file into /etc/yum.repos.d
$ curl "https://download.docker.com/linux/fedora/docker-ce.repo" | sudo tee /etc/yum.repos.d/docker.repoAnd now, we create the systemd extension, and install in it docker-ce packages
$ ./dnf5-sysext.nu install \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-pluginShould show a prompt to confirm whenever start the extension.
Afterwards, all left is enabling docker.
$ systemctl enable --now dockerAs its experimental state implies, this script can render your PC inoperable. Here is a quick guide to fix it:
-
Boot into grub, press e to edit the kernel parameters, and append
systemd.mask=systemd-sysext.servicethis to the penultimate line, Ctrl + x to boot. -
Once logged in, remove the contents of
/var/lib/extensions/WHATEVER_EXT_NAME, by default being/var/lib/extensions/dnf5_sysext
sudo rm -rf /var/lib/extensions/dnf5_sysext