diff --git a/build_files/build.sh b/build_files/build.sh index 6e7b38c..6d98b3a 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -103,43 +103,13 @@ dnf5 install -y \ waypipe \ htop -# Delete 1Password and Tailscale repos once packages are installed -# so they don't end up in the final image, and don't raise an error if any of -# these files does not exist when attempting to delete them. -rm \ - /etc/yum.repos.d/1password.repo \ - /etc/yum.repos.d/tailscale.repo \ - /etc/pki/rpm-gpg/1password.asc \ - /etc/pki/rpm-gpg/tailscale.gpg \ - 2>&1 +# Install Niri, the scrollable-tiling window compositor +# https://yalter.github.io/niri/ +dnf5 -y copr enable avengemedia/dms +dnf5 -y install niri dms +dnf5 -y copr disable avengemedia/dms -# Or just disable: -# dnf5 config-manager setopt 1password.enabled=0 tailscale-stable.enabled=0 -# sed -i 's/enabled=1/enabled=0/' \ -# /etc/yum.repos.d/1password.repo \ -# /etc/yum.repos.d/tailscale.repo \ - -# Fedora Flatpak service is a part of the flatpak package, ensure it's overridden by moving to replace it at the end of the build. -mv -f /usr/lib/systemd/system/flatpak-add-flathub-repos.service /usr/lib/systemd/system/flatpak-add-fedora-repos.service - -# Enable Tailscale +# Enable Tailscale service systemctl enable tailscaled -# Cleanup - -# Remove dnf5 versionlocks -dnf5 versionlock clear - -# Remove tmp files and everything in dirs that make bootc unhappy -rm -rf /tmp/* || true -rm -rf /usr/etc -rm -rf /boot && mkdir /boot -# Preserve cache mounts -find /var/* -maxdepth 0 -type d \! -name cache \! -name log -exec rm -rf {} \; -find /var/cache/* -maxdepth 0 -type d \! -name libdnf5 -exec rm -rf {} \; - -# Make sure /var/tmp is properly created -mkdir -p /var/tmp -chmod -R 1777 /var/tmp - echo "Done." diff --git a/build_files/cleanup.sh b/build_files/cleanup.sh index 5828eec..72f3277 100755 --- a/build_files/cleanup.sh +++ b/build_files/cleanup.sh @@ -2,6 +2,53 @@ set -ouex pipefail +# Delete 1Password and Tailscale repos once packages are installed +# so they don't end up in the final image, and don't raise an error if any of +# these files does not exist when attempting to delete them. +rm \ + /etc/yum.repos.d/1password.repo \ + /etc/yum.repos.d/tailscale.repo \ + /etc/pki/rpm-gpg/1password.asc \ + /etc/pki/rpm-gpg/tailscale.gpg \ + 2>&1 + +# Or just disable: +# dnf5 config-manager setopt 1password.enabled=0 tailscale-stable.enabled=0 +# sed -i 's/enabled=1/enabled=0/' \ +# /etc/yum.repos.d/1password.repo \ +# /etc/yum.repos.d/tailscale.repo \ + +# Fedora Flatpak service is a part of the flatpak package, ensure it's overridden by moving to replace it at the end of the build. +mv -f /usr/lib/systemd/system/flatpak-add-flathub-repos.service /usr/lib/systemd/system/flatpak-add-fedora-repos.service + +# Re-install all pre-installed (GNOME) applications from Flathub +#flatpak install --reinstall flathub "$(flatpak list --app-runtime=org.fedoraproject.Platform --columns=application | tail -n +1 )" + +# ...and remove the fedora flatpak remotes +#flatpak remote-delete --force fedora +#flatpak remote-delete --force fedora-testing + +# TODO: Add flathub remove, enable, and remove filter +# TODO: Install core GNOME Flatpak apps +# TODO: Install my own commonly used Flatpak apps +# IDEA: Can I set certain dconf settings, like Ptyxis config, temperature settings, etc? +# IDEA: Can I set certain Flatpak system defaults (ie. no read/write anywhere by default) + +# Remove dnf5 versionlocks +dnf5 versionlock clear + +# Remove tmp files and everything in dirs that make bootc unhappy +rm -rf /tmp/* || true +rm -rf /usr/etc +rm -rf /boot && mkdir /boot +# Preserve cache mounts +find /var/* -maxdepth 0 -type d \! -name cache \! -name log -exec rm -rf {} \; +find /var/cache/* -maxdepth 0 -type d \! -name libdnf5 -exec rm -rf {} \; + +# Make sure /var/tmp is properly created +mkdir -p /var/tmp +chmod -R 1777 /var/tmp + ## Handle files that rpm-ostree would normally remove ## Adapted from: https://github.com/hhd-dev/rechunk/blob/master/1_prune.sh#L33