24 Commits

Author SHA1 Message Date
0c4bcb9c1e [TEST] Set system-wide add-wants for Niri
Some checks failed
Build container image / Build and push image (pull_request) Failing after 6m59s
2026-01-20 12:40:56 +09:00
5917eb8423 Merge branch 'main' into niri-tiling-compositor 2026-01-20 12:38:15 +09:00
79a855f6b2 Don't raise error when attempting to delete files that don't exist
All checks were successful
Build container image / Build and push image (push) Successful in 30m23s
2025-12-17 19:53:18 +09:00
0e39bc8924 Add htop as a layered package.
All checks were successful
Build container image / Build and push image (push) Successful in 30m43s
2025-12-17 13:06:12 +09:00
b5992b2880 Add waypipe
All checks were successful
Build container image / Build and push image (push) Successful in 30m32s
2025-12-05 13:51:03 +09:00
1e892056c8 Layer fish shell, too.
All checks were successful
Build container image / Build and push image (push) Successful in 26m48s
2025-12-03 11:50:40 +09:00
49d1a97e2a I give up. For now.
All checks were successful
Build container image / Build and push image (push) Successful in 25m36s
2025-12-01 22:19:56 +09:00
e816126ea2 "Let's try this again"
Some checks failed
Build container image / Build and push image (push) Failing after 4m17s
2025-12-01 22:08:48 +09:00
3b46c3b939 Sunk cost fallacy
Some checks failed
Build container image / Build and push image (push) Failing after 3m26s
2025-12-01 21:47:25 +09:00
705e83eafb I always forget.
Some checks failed
Build container image / Build and push image (push) Failing after 4m0s
2025-12-01 21:32:01 +09:00
389352e2d6 Attempt to re-add (optionally) writing passwd changes
Some checks failed
Build container image / Build and push image (push) Failing after 4m45s
2025-12-01 20:06:06 +09:00
047419e525 Temporarily only look at /etc/group
All checks were successful
Build container image / Build and push image (push) Successful in 24m3s
2025-12-01 18:54:34 +09:00
8efc5f4192 Add some debug echos, trigger cleanup while mounts are present
Some checks failed
Build container image / Build and push image (push) Failing after 3m40s
2025-12-01 18:36:49 +09:00
cab4c6cdd9 Attempt: Separate cleanup step
Some checks failed
Build container image / Build and push image (push) Failing after 4m26s
2025-12-01 18:27:30 +09:00
2908caaf59 Further reduce. Re-remove system-installed Firefox
Some checks failed
Build container image / Build and push image (push) Failing after 3m52s
2025-12-01 18:14:05 +09:00
6328eadaff One step back
Some checks failed
Build container image / Build and push image (push) Failing after 3m1s
2025-12-01 17:58:51 +09:00
e4afe6923f Borrow certain /etc/passwd and /etc/group clean-up steps from hhd-dev/rechunk
Some checks failed
Build container image / Build and push image (push) Failing after 3m31s
2025-12-01 17:46:09 +09:00
9e45c8ac23 Temporarily stop removing system-installed Firefox
All checks were successful
Build container image / Build and push image (push) Successful in 27m0s
I'm trying to debug why my
system-installed-1Password-and-Firefox-flatpak "hack" doesn't work on my
bootc image.
2025-12-01 17:09:19 +09:00
02a288c2c0 Add my own registries.d policy file, too
Some checks failed
Build container image / Build and push image (push) Failing after 26s
2025-11-16 16:52:37 +09:00
71626ad6c9 Ensure the correct tags are set with new builds
All checks were successful
Build container image / Build and push image (push) Successful in 25m50s
2025-11-16 16:07:11 +09:00
91d249901e Move containers policy file to the right place
All checks were successful
Build container image / Build and push image (push) Successful in 26m27s
Oops :D
2025-11-16 15:28:03 +09:00
8d50133103 Actually copy cosign.pub into the build context
All checks were successful
Build container image / Build and push image (push) Successful in 25m42s
2025-11-16 14:53:53 +09:00
8f80e0f85b Attempt: Add custom containers-policy.json
Some checks failed
Build container image / Build and push image (push) Failing after 2m12s
2025-11-16 14:43:10 +09:00
011fa92cdb Update cron schedule so builds only run every three days
All checks were successful
Build container image / Build and push image (push) Successful in 27m58s
2025-11-13 21:36:01 +09:00
6 changed files with 135 additions and 15 deletions

View File

@@ -5,7 +5,7 @@ on:
branches:
- main
schedule:
- cron: "05 10 * * *" # 10:05am UTC everyday
- cron: "05 4 */3 * *" # 4:05am every three days.
push:
branches:
- main
@@ -73,10 +73,10 @@ jobs:
with:
# This generates all the tags for your image, you can add custom tags here too!
tags: |
type=sha
type=raw,value=latest,enable=${{ github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=${{ env.FEDORA_BASE }},enable=${{ github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=${{ env.FEDORA_BASE }}-{{date 'YYYYMMDD'}},enable=${{ github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=sha,enable=${{ github.event_name == 'pull_request' }}
type=raw,value=latest
type=raw,value=${{ env.FEDORA_BASE }}
type=raw,value=${{ env.FEDORA_BASE }}-{{date 'YYYYMMDD'}}
type=ref,event=pr
labels: |
io.artifacthub.package.readme-url=${{ env.README_URL }}

View File

@@ -4,6 +4,7 @@ ARG FEDORA_BASE=42
FROM scratch AS ctx
COPY build_files /
COPY /sys_files /sys_files
COPY cosign.pub /cosign.pub
# Base Image
FROM quay.io/fedora-ostree-desktops/silverblue:$FEDORA_BASE
@@ -27,7 +28,7 @@ RUN --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=cache,dst=/var/cache \
--mount=type=cache,dst=/var/log \
--mount=type=tmpfs,dst=/tmp \
/ctx/build.sh
/ctx/build.sh && /ctx/cleanup.sh
### LINTING
## Verify final image and contents are correct.

View File

@@ -5,6 +5,10 @@ set -ouex pipefail
# Copy System Files onto root
rsync -rvK /ctx/sys_files/ /
# Copy cosign.pub key into the right location
mkdir -p /etc/pki/containers
cp /ctx/cosign.pub /etc/pki/containers/davejansen.pub
### Install packages
# Packages can be installed from any enabled yum repo on the image.
@@ -27,8 +31,9 @@ fi
# Set higher priority
dnf5 config-manager setopt fedora-multimedia.priority=90
# Remove system-installed Firefox as I prefer to use the Flatpak version
dnf5 remove -y firefox firefox-langpacks fedora-flathub-remote
# Remove Fedora's package that enforces their own (filtered) version of the
# flathub repo is present, as-well as the system-installed Firefox as I prefer to use the Flatpak version
dnf5 remove -y fedora-flathub-remote firefox firefox-langpacks
# Add Flathub to the image for eventual application
mkdir -p /etc/flatpak/remotes.d/
@@ -55,12 +60,15 @@ dnf5 distro-sync --skip-unavailable -y --repo='fedora-multimedia' "${OVERRIDES[@
dnf5 versionlock add "${OVERRIDES[@]}"
# Remove additional repositories Fedora comes with out of the box
# And don't raise an error if any of these files does not exist when attempting
# to delete them.
rm \
/etc/yum.repos.d/fedora-cisco-openh264.repo \
/etc/yum.repos.d/google-chrome.repo \
/etc/yum.repos.d/rpmfusion-nonfree-nvidia-driver.repo \
/etc/yum.repos.d/rpmfusion-nonfree-steam.repo \
/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:phracek:PyCharm.repo
/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:phracek:PyCharm.repo \
2>&1
# Add country query to all repo metalinks
# shellcheck disable=SC2016
@@ -82,6 +90,7 @@ sh -c 'echo -e "[tailscale-stable]\nname=Tailscale stable\nbaseurl=https://pkgs.
# Install my own layered packages
dnf5 install -y \
fish \
gvfs-nfs \
openssl \
wl-clipboard \
@@ -90,7 +99,9 @@ dnf5 install -y \
libcamera libcamera-gstreamer libcamera-ipa libcamera-tools pipewire-plugin-libcamera \
gnome-shell-extension-appindicator \
1password 1password-cli \
tailscale
tailscale \
waypipe \
htop
# Install Niri, the scrollable-tiling window compositor
# https://yalter.github.io/niri/
@@ -98,19 +109,19 @@ dnf5 -y copr enable avengemedia/dms
dnf5 -y install niri dms
dnf5 -y copr disable avengemedia/dms
# systemctl enable niri.service
#systemctl enable --user niri.service
#systemctl add-wants --user niri.service dms
systemctl add-wants niri.service dms
## CLEANUP
# Delete 1Password and Tailscale repos once packages are installed
# so they don't end up in the final image.
# 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
/etc/pki/rpm-gpg/tailscale.gpg \
2>&1
# Or just disable:
# dnf5 config-manager setopt 1password.enabled=0 tailscale-stable.enabled=0

73
build_files/cleanup.sh Executable file
View File

@@ -0,0 +1,73 @@
#!/bin/bash
set -ouex pipefail
## Handle files that rpm-ostree would normally remove
## Adapted from: https://github.com/hhd-dev/rechunk/blob/master/1_prune.sh#L33
# if [ -f /etc/passwd ]; then
# out="$(grep -v 'root' /etc/passwd)"
#
# if [[ ! -z "$out" ]]; then
# echo
# echo Appending the following passwd users to /usr/lib/passwd
# echo "${out}"
# echo "$out" >>/usr/lib/passwd
# fi
# fi
if [ -f /etc/group ]; then
out="$(grep -v 'root\|wheel' /etc/group)"
if [[ ! -z "$out" ]]; then
echo
echo Appending the following group entries to /usr/lib/group
echo "$out"
echo "$out" >>/usr/lib/group
fi
fi
if [ -f /etc/passwd ] || [ -f /etc/group ]; then
echo
echo "Warning: Make sure processed users and groups are from installed programs!"
fi
# # Create defaults for /etc/passwd, /etc/group
# cat <<EOT >/etc/passwd
# root:x:0:0:root:/root:/bin/bash
# EOT
# cat <<EOT >/etc/group
# root:x:0:
# wheel:x:10:
# EOT
# Extra lock files created by container processes that might cause issues
rm -rf \
/etc/.pwd.lock \
/etc/passwd- \
/etc/group- \
/etc/shadow- \
/etc/gshadow- \
/etc/subuid- \
/etc/subgid- \
/.dockerenv
# # Merge /usr/etc to /etc
# # OSTree will error out if both dirs exist
# # And rpm-ostree will be confused and use only one of them
# if [ -d /usr/etc ]; then
# echo
# echo WARNING: FOUND /usr/etc. MERGING TO ETC FOR COMPATIBILITY
# echo EXPECT PERMISSIONS ISSUES ON THE MERGED PATHS
# echo The following files from /usr/etc will be merged to /etc:
# tree /usr/etc
#
# echo
# rsync -aAX --numeric-ids --checksum --links /usr/etc/ /etc
# rm -rf /usr/etc
# fi
#
# # Move /etc to /usr/etc
# mv /etc /usr/
# ...normal ublue-inspired steps continue.

View File

@@ -0,0 +1,32 @@
{
"default": [
{
"type": "reject"
}
],
"transports": {
"docker": {
"davejansen.dev": [
{
"type": "sigstoreSigned",
"keyPaths": ["/etc/pki/containers/davejansen.pub"],
"signedIdentity": {
"type": "matchRepository"
}
}
],
"": [
{
"type": "insecureAcceptAnything"
}
]
},
"docker-daemon": {
"": [
{
"type": "insecureAcceptAnything"
}
]
}
}
}

View File

@@ -0,0 +1,3 @@
docker:
davejansen.dev/davejansen:
use-sigstore-attachments: true