#!/usr/bin/env bash set -xeuo pipefail systemctl enable sshd systemctl enable podman-auto-update.timer systemctl enable --global podman-auto-update.timer dnf -y remove \ adcli \ libdnf-plugin-subscription-manager \ python3-subscription-manager-rhsm \ subscription-manager \ subscription-manager-rhsm-certificates \ toolbox \ yggdrasil dnf -y install --setopt=install_weak_deps=False \ cockpit-machines \ cockpit-networkmanager \ cockpit-podman \ cockpit-selinux \ cockpit-storaged \ cockpit-system \ firewalld \ git-core \ libvirt-client \ libvirt-daemon \ libvirt-daemon-kvm \ NetworkManager-wifi \ open-vm-tools \ pcp-zeroconf \ qemu-guest-agent \ rsync \ systemd-resolved \ udisks2-lvm2 \ virt-install \ xdg-user-dirs systemctl enable firewalld dnf config-manager --add-repo "https://pkgs.tailscale.com/stable/centos/$(rpm -E %centos)/tailscale.repo" dnf config-manager --set-disabled tailscale-stable dnf -y install --enablerepo='tailscale-stable' tailscale systemctl enable tailscaled dnf -y install https://github.com/fastfetch-cli/fastfetch/releases/download/2.50.2/fastfetch-linux-amd64.rpm dnf -y install NetworkManager-wifi \ atheros-firmware \ brcmfmac-firmware \ iwlegacy-firmware \ iwlwifi-dvm-firmware \ iwlwifi-mvm-firmware \ mt7xxx-firmware \ nxpwireless-firmware \ realtek-firmware \ tiwilink-firmware dnf -y install epel-release dnf config-manager --set-disabled epel dnf -y install --enablerepo="epel" just btop htop # Apply IP Forwarding before installing Docker to prevent messing with LXC networking sysctl -p # Load iptable_nat module for docker-in-docker. # See: # - https://github.com/ublue-os/bluefin/issues/2365 # - https://github.com/devcontainers/features/issues/1235 mkdir -p /etc/modules-load.d && cat >>/etc/modules-load.d/ip_tables.conf </dev/null; then systemctl enable docker.socket fi # rm -rf /etc/group # 6. Disable Docker repository to prevent runtime updates echo "Docker CE installation complete!" echo "Installing cloud init" dnf install -y cloud-init tee /usr/lib/systemd/zram-generator.conf </usr/lib/systemd/system-preset/91-resolved-default.preset <<'EOF' enable systemd-resolved.service EOF cat >/usr/lib/tmpfiles.d/resolved-default.conf <<'EOF' L /etc/resolv.conf - - - - ../run/systemd/resolve/stub-resolv.conf EOF systemctl preset systemd-resolved.service KERNEL_VERSION="$(find "/usr/lib/modules" -maxdepth 1 -type d ! -path "/usr/lib/modules" -exec basename '{}' ';' | sort | tail -n 1)" export DRACUT_NO_XATTR=1 dracut --no-hostonly --kver "$KERNEL_VERSION" --reproducible --zstd -v --add ostree -f "/usr/lib/modules/$KERNEL_VERSION/initramfs.img" chmod 0600 "/usr/lib/modules/${KERNEL_VERSION}/initramfs.img"