55 Commits

Author SHA1 Message Date
8f32fde51a Switch out Taiwan with Australia
Some checks failed
Build container image / Build and push image (niri) (push) Failing after 25m59s
Build container image / Build and push image (gnome) (push) Failing after 26m0s
At least one mirror in Taiwan seems to be incomplete/broken right now.
2026-03-12 14:54:39 +09:00
c320f894a7 Fix incorrect order of events
Some checks failed
Build container image / Build and push image (niri) (push) Failing after 3m40s
Build container image / Build and push image (gnome) (push) Successful in 29m30s
2026-03-12 14:46:14 +09:00
4b97329839 Don't use relative path to packages.sh
Some checks failed
Build container image / Build and push image (gnome) (push) Failing after 2m57s
Build container image / Build and push image (niri) (push) Has been cancelled
2026-03-12 14:41:30 +09:00
7e14520e7b Attempt: Add Bitwarden direct RPM install
Some checks failed
Build container image / Build and push image (niri) (push) Failing after 2m56s
Build container image / Build and push image (gnome) (push) Failing after 3m38s
2026-03-12 14:35:16 +09:00
52588956a9 Separate out common tasks between two builds 2026-03-12 14:32:54 +09:00
13111c5203 Attempt to re-add /etc/passwd fiddling (Niri only).
Some checks failed
Build container image / Build and push image (gnome) (push) Failing after 30m12s
Build container image / Build and push image (niri) (push) Successful in 31m33s
2026-02-23 11:29:40 +09:00
902f915433 Modify concurrency setting
It was added to potentially cancel superseded running tasks, but it was
also making the `niri` build wait until the `gnome` build was done. My
bad.
2026-02-23 11:17:00 +09:00
27001fe170 Merge pull request '[Experiment] Build Niri image off of base image.' (#6) from split-niri-gnome into main
All checks were successful
Build container image / Build and push image (gnome) (push) Successful in 29m56s
Build container image / Build and push image (niri) (push) Successful in 22m43s
Reviewed-on: https://davejansen.dev/davejansen/fedora-bootc/pulls/6
2026-02-23 10:52:00 +09:00
e0e80202fa Remove GNOME extension I accidentally left in for the Niri build.
All checks were successful
Build container image / Build and push image (niri) (pull_request) Successful in 19m24s
Build container image / Build and push image (gnome) (pull_request) Successful in 21m29s
2026-01-29 13:08:30 +09:00
b35099783b Split niri and gnome builds using a matrix workflow, for now.
All checks were successful
Build container image / Build and push image (niri) (pull_request) Successful in 21m36s
Build container image / Build and push image (gnome) (pull_request) Successful in 23m2s
2026-01-29 12:55:54 +09:00
88fc870ab3 Add brightnessctl dependency
Some checks failed
Build container image / Build and push image (push) Failing after 8m40s
2026-01-20 18:17:57 +09:00
6b56104370 Add alacritty
All checks were successful
Build container image / Build and push image (push) Successful in 32m32s
2026-01-20 15:26:14 +09:00
fca98db506 Merge pull request 'Experiment: Add Niri compositor' (#5) from niri-tiling-compositor into main
Some checks failed
Build container image / Build and push image (push) Has been cancelled
Reviewed-on: https://davejansen.dev/davejansen/fedora-bootc/pulls/5
2026-01-20 14:59:20 +09:00
87b64e24c6 Move more cleanup steps to cleanup.sh
All checks were successful
Build container image / Build and push image (pull_request) Successful in 17m32s
2026-01-20 14:35:29 +09:00
ee6acb7792 Don't want dms for now, let's try that as a post-install step
All checks were successful
Build container image / Build and push image (pull_request) Successful in 18m19s
2026-01-20 13:21:41 +09:00
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
f3528ee7c5 Well, giving up on this for add-wants stuff for now.
All checks were successful
Build container image / Build and push image (pull_request) Successful in 20m7s
2025-11-13 21:13:34 +09:00
d950676042 More add-wants related fiddling.
Some checks failed
Build container image / Build and push image (pull_request) Failing after 3m57s
2025-11-13 21:08:36 +09:00
9aaaf0fea0 Repo name?
Some checks failed
Build container image / Build and push image (pull_request) Failing after 4m1s
2025-11-13 19:55:35 +09:00
5bab3226dc Attempt to force niri install from its copr
Some checks failed
Build container image / Build and push image (pull_request) Failing after 3m19s
2025-11-13 19:46:19 +09:00
1688c213d4 Test: Enable niri service and *then* add-wants
Some checks failed
Build container image / Build and push image (pull_request) Failing after 5m9s
2025-11-13 19:35:48 +09:00
4656aa1e85 Exclude add-wants command for now
All checks were successful
Build container image / Build and push image (pull_request) Successful in 22m29s
2025-11-13 19:12:57 +09:00
3174916dfd Non-user add-wants?
Some checks failed
Build container image / Build and push image (pull_request) Failing after 4m9s
2025-11-13 19:02:06 +09:00
eda903911d Merge branch 'main' into niri-tiling-compositor
Some checks failed
Build container image / Build and push image (pull_request) Failing after 3m59s
2025-11-13 18:56:25 +09:00
d35c6f88ba Merge pull request 'Attempt: Use Vanilla Silverblue as Base' (#1) from vanilla-silverblue-base into main
All checks were successful
Build container image / Build and push image (push) Successful in 25m12s
Reviewed-on: https://davejansen.dev/davejansen/fedora-bootc/pulls/1
2025-11-13 18:54:44 +09:00
03fce0dbd8 Disable rechunker for now
All checks were successful
Build container image / Build and push image (pull_request) Successful in 18m22s
2025-11-13 17:50:24 +09:00
aff8f8eb23 Build label name change test for Rechunker
Some checks failed
Build container image / Build and push image (pull_request) Failing after 20m19s
2025-11-13 17:23:37 +09:00
3bcb1f840b Fix typo, remove some unused blocks
Some checks failed
Build container image / Build and push image (pull_request) Failing after 15m54s
2025-11-02 18:48:28 +09:00
f1c09b70b4 Check out Rechunker
Some checks failed
Build container image / Build and push image (pull_request) Failing after 16m27s
2025-11-02 18:05:02 +09:00
dc7950a1ec Only add tags when needed
All checks were successful
Build container image / Build and push image (pull_request) Successful in 17m28s
Temporarily by line-by-line iffing them out.
2025-11-02 17:43:10 +09:00
9456f1065f Add quick debug echo
All checks were successful
Build container image / Build and push image (pull_request) Successful in 18m41s
2025-11-02 17:07:13 +09:00
5c60ac07d3 First attempt at using vanilla Silverblue base
Some checks failed
Build container image / Build and push image (pull_request) Failing after 1m31s
2025-11-02 16:37:21 +09:00
15 changed files with 510 additions and 260 deletions

View File

@@ -1,115 +0,0 @@
---
name: Build disk images
on:
workflow_dispatch:
inputs:
upload-to-s3:
description: "Upload to S3"
required: false
default: false
type: boolean
platform:
required: true
type: choice
options:
- amd64
- arm64
pull_request:
branches:
- main
paths:
- './disk_config/disk.toml'
- './disk_config/iso.toml'
- './.github/workflows/build-disk.yml'
env:
IMAGE_NAME: ${{ github.event.repository.name }} # output of build.yml, keep in sync
IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" # do not edit
DEFAULT_TAG: "latest"
BIB_IMAGE: "ghcr.io/lorbuschris/bootc-image-builder:20250608" # "quay.io/centos-bootc/bootc-image-builder:latest" - see https://github.com/osbuild/bootc-image-builder/pull/954
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: Build disk images
runs-on: ${{ inputs.platform == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
strategy:
fail-fast: false
matrix:
disk-type: ["qcow2", "anaconda-iso"]
permissions:
contents: read
packages: read
id-token: write
steps:
- name: Prepare environment
run: |
USER_UID=$(id -u)
USER_GID=$(id -g)
# Concatenate the types with a hyphen
DISK_TYPE=$(echo "${{ matrix.disk-type }}" | tr ' ' '-')
# Lowercase the image uri
echo "IMAGE_REGISTRY=${IMAGE_REGISTRY,,}" >> ${GITHUB_ENV}
echo "IMAGE_NAME=${IMAGE_NAME,,}" >> ${GITHUB_ENV}
echo "DISK_TYPE=${DISK_TYPE}" >> ${GITHUB_ENV}
echo "USER_UID=${USER_UID}" >> ${GITHUB_ENV}
echo "USER_GID=${USER_GID}" >> ${GITHUB_ENV}
- name: Install dependencies
if: inputs.platform == 'arm64'
run: |
set -x
sudo apt update -y
sudo apt install -y \
podman
- name: Maximize build space
if: inputs.platform != 'arm64'
uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9
with:
remove-codeql: true
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Build disk images
id: build
uses: osbuild/bootc-image-builder-action@main
with:
builder-image: ${{ env.BIB_IMAGE }}
config-file: ${{ matrix.disk-type == 'anaconda-iso' && './disk_config/iso.toml' || './disk_config/disk.toml' }}
image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}
chown: ${{ env.USER_UID }}:${{ env.USER_GID }}
types: ${{ matrix.disk-type }}
additional-args: --use-librepo=True
- name: Upload disk images and Checksum to Job Artifacts
if: inputs.upload-to-s3 != true && github.event_name != 'pull_request'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
path: ${{ steps.build.outputs.output-directory }}
if-no-files-found: error
retention-days: 0
compression-level: 0
overwrite: true
- name: Upload to S3
if: inputs.upload-to-s3 == true && github.event_name != 'pull_request'
shell: bash
env:
RCLONE_CONFIG_S3_TYPE: s3
RCLONE_CONFIG_S3_PROVIDER: ${{ secrets.S3_PROVIDER }}
RCLONE_CONFIG_S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
RCLONE_CONFIG_S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
RCLONE_CONFIG_S3_REGION: ${{ secrets.S3_REGION }}
RCLONE_CONFIG_S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
SOURCE_DIR: ${{ steps.build.outputs.output-directory }}
run: |
sudo apt-get update
sudo apt-get install -y rclone
rclone copy $SOURCE_DIR S3:${{ secrets.S3_BUCKET_NAME }}

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
@@ -27,22 +27,26 @@ env:
https://davejansen.dev/${{ github.repository_owner }}/${{
github.event.repository.name }}
concurrency:
group:
${{ github.workflow }}-${{ github.ref || github.run_id }}-${{
inputs.brand_name}}-${{ inputs.stream_name }}
cancel-in-progress: true
jobs:
build_push:
name: Build and push image
runs-on: ubuntu-24.04
strategy:
matrix:
variant: [gnome, niri]
permissions:
contents: read
packages: write
id-token: write
concurrency:
group:
${{ github.workflow }}-${{ github.ref || github.run_id }}-${{
matrix.variant }}
cancel-in-progress: true
steps:
- name: Prepare environment
run: |
@@ -50,16 +54,6 @@ jobs:
echo "IMAGE_REGISTRY=${IMAGE_REGISTRY,,}" >> ${GITHUB_ENV}
echo "IMAGE_NAME=${IMAGE_NAME,,}" >> ${GITHUB_ENV}
# Pre-create Podman's auth file directory and file, this is somehow needed here.
#mkdir -p /tmp/podman-run-0/containers
#echo "{}" > /tmp/podman-run-0/containers/auth.json
# Pre-create docker config file
#mkdir -p ~/.docker
#echo "{}" > ~/.docker/config.json
#touch /tmp/podman-run-0/containers/auth.json
# These stage versions are pinned by https://github.com/renovatebot/renovate
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
@@ -83,11 +77,10 @@ jobs:
with:
# This generates all the tags for your image, you can add custom tags here too!
tags: |
# set latest tag for main branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=${{ env.FEDORA_BASE }}
type=raw,value=${{ env.FEDORA_BASE }}-{{date 'YYYYMMDD'}}
type=sha,enable=${{ github.event_name == 'pull_request' }}
type=raw,value=latest-${{ matrix.variant }}
type=raw,value=${{ env.FEDORA_BASE }}-${{ matrix.variant }}
type=raw,value=${{ env.FEDORA_BASE }}-${{ matrix.variant }}-{{date 'YYYYMMDD'}}
type=ref,event=pr
labels: |
io.artifacthub.package.readme-url=${{ env.README_URL }}
@@ -117,12 +110,13 @@ jobs:
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2
with:
containerfiles: |
./Containerfile
./Containerfile.${{ matrix.variant }}
build-args: |
FEDORA_BASE=${{ env.FEDORA_BASE }}
image: ${{ env.IMAGE_NAME }}
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
#labels: "localhost/${{ env.IMAGE_NAME }}:${{ env.FEDORA_BASE }}"
extra-args: --isolation=chroot
oci: false
@@ -132,25 +126,21 @@ jobs:
# You can enable it by uncommenting the following lines:
# - name: Run Rechunker
# id: rechunk
# uses: hhd-dev/rechunk@f153348d8100c1f504dec435460a0d7baf11a9d2 # v1.1.1
# uses: hhd-dev/rechunk@v1.2.4
# with:
# rechunk: 'ghcr.io/hhd-dev/rechunk:v1.0.1'
# ref: "localhost/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}"
# prev-ref: "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}"
# rechunk: "ghcr.io/hhd-dev/rechunk:v1.2.4"
# ref: "localhost/${{ env.IMAGE_NAME }}:${{ env.FEDORA_BASE }}"
# prev-ref:
# "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.FEDORA_BASE
# }}"
# skip_compression: true
# version: ${{ env.CENTOS_VERSION }}
# version: ${{ env.FEDORA_BASE }}
# labels: ${{ steps.metadata.outputs.labels }} # Rechunk strips out all the labels during build, this needs to be reapplied here with newline separator
# This is necessary so that the podman socket can find the rechunked image on its storage
# - name: Load in podman and tag
# run: |
# IMAGE=$(podman pull ${{ steps.rechunk.outputs.ref }})
# sudo rm -rf ${{ steps.rechunk.outputs.output }}
# for tag in ${{ steps.metadata.outputs.tags }}; do
# podman tag $IMAGE ${{ env.IMAGE_NAME }}:$tag
# done
- name: Login to Container Registry
if:
github.event_name != 'pull_request' && github.ref ==
format('refs/heads/{0}', github.event.repository.default_branch)
run: |
podman login \
--verbose \

View File

@@ -1,20 +1,13 @@
ARG FEDORA_BASE=42
ARG FEDORA_BASE=43
# Allow build scripts to be referenced without being copied into the final image
FROM scratch AS ctx
COPY build_files /
COPY /sys_files /sys_files
COPY cosign.pub /cosign.pub
# Base Image
FROM ghcr.io/ublue-os/silverblue-main:$FEDORA_BASE
## Other possible base images include:
# FROM ghcr.io/ublue-os/bazzite:latest
# FROM ghcr.io/ublue-os/bluefin-nvidia:stable
#
# ... and so on, here are more base images
# Universal Blue Images: https://github.com/orgs/ublue-os/packages
# Fedora base image: quay.io/fedora/fedora-bootc:41
# CentOS base images: quay.io/centos-bootc/centos-bootc:stream10
FROM quay.io/fedora-ostree-desktops/silverblue:$FEDORA_BASE
### [IM]MUTABLE /opt
## Some bootable images, like Fedora, have /opt symlinked to /var/opt, in order to
@@ -35,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/gnome/build.sh && /ctx/gnome/cleanup.sh
### LINTING
## Verify final image and contents are correct.

35
Containerfile.niri Normal file
View File

@@ -0,0 +1,35 @@
ARG FEDORA_BASE=43
# Allow build scripts to be referenced without being copied into the final image
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/base-atomic:$FEDORA_BASE
### [IM]MUTABLE /opt
## Some bootable images, like Fedora, have /opt symlinked to /var/opt, in order to
## make it mutable/writable for users. However, some packages write files to this directory,
## thus its contents might be wiped out when bootc deploys an image, making it troublesome for
## some packages. Eg, google-chrome, docker-desktop.
##
## Uncomment the following line if one desires to make /opt immutable and be able to be used
## by the package manager.
RUN rm /opt && mkdir /opt
### MODIFICATIONS
## make modifications desired in your image and install packages by modifying the build.sh script
## the following RUN directive does all the things required to run "build.sh" as recommended.
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/niri/build.sh && /ctx/niri/cleanup.sh
### LINTING
## Verify final image and contents are correct.
RUN bootc container lint

View File

@@ -1,97 +0,0 @@
#!/bin/bash
set -ouex pipefail
### Install packages
# Packages can be installed from any enabled yum repo on the image.
# RPMfusion repos are available by default in ublue main images
# List of rpmfusion packages can be found here:
# https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/39/x86_64/repoview/index.html&protocol=https&redirect=1
# Remove system-installed Firefox as I prefer to use the Flatpak version
dnf5 remove -y firefox firefox-langpacks
# Remove additional repositories Fedora comes with out of the box
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
# Add country query to all repo metalinks
# shellcheck disable=SC2016
sed -i -e '/^metalink\=/s/\$releasever\&arch\=\$basearch$/\$releasever\&arch\=\$basearch\&country\=KR,JP,TW/g' /etc/yum.repos.d/*.repo
# Add 1Password repo
#rpmkeys --import https://downloads.1password.com/linux/keys/1password.asc
cp /ctx/rpm-keys/1password.asc /etc/pki/rpm-gpg/1password.asc
sh -c 'echo -e "[1password]\nname=1Password Stable Channel\nbaseurl=https://downloads.1password.com/linux/rpm/stable/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\"file:///etc/pki/rpm-gpg/1password.asc\"" > /etc/yum.repos.d/1password.repo'
# Add Tailscale repo
#rpmkeys --import https://pkgs.tailscale.com/stable/fedora/repo.gpg
#dnf5 config-manager addrepo --from-repofile=https://pkgs.tailscale.com/stable/fedora/tailscale.repo
cp /ctx/rpm-keys/tailscale.gpg /etc/pki/rpm-gpg/tailscale.gpg
sh -c 'echo -e "[tailscale-stable]\nname=Tailscale stable\nbaseurl=https://pkgs.tailscale.com/stable/fedora/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\"file:///etc/pki/rpm-gpg/tailscale.gpg\"" > /etc/yum.repos.d/tailscale.repo'
# Update all existing packages
# dnf5 update -y
# Install my own layered packages
dnf5 install -y \
gvfs-nfs \
openssl \
gnome-shell-extension-appindicator \
1password 1password-cli \
tailscale
# Install Niri, the scrollable-tiling window compositor
# https://yalter.github.io/niri/
dnf5 -y copr enable avengemedia/dms
dnf5 -y install niri dms
systemctl --user add-wants niri.service dms
dnf5 -y copr disable avengemedia/dms
## CLEANUP
# Delete 1Password and Tailscale repos once packages are installed
# so they don't end up in the final image.
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
# 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
# Add Flathub
#flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
#flatpak remote-modify --enable --no-filter flathub
# 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)
# Use a COPR Example:
#
# dnf5 -y copr enable ublue-os/staging
# dnf5 -y install package
# Disable COPRs so they don't end up enabled on the final image:
# dnf5 -y copr disable ublue-os/staging
# Enable Tailscale service
systemctl enable tailscaled

101
build_files/common/packages.sh Executable file
View File

@@ -0,0 +1,101 @@
#!/bin/bash
set -ouex pipefail
### Install packages
# Packages can be installed from any enabled yum repo on the image.
# RPMfusion repos are available by default in ublue main images
# List of rpmfusion packages can be found here:
# https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/39/x86_64/repoview/index.html&protocol=https&redirect=1
# Enable fedora-multimedia with a higher priority than default
if ! grep -q fedora-multimedia <(dnf5 repolist); then
# Enable or Install Repofile
#dnf5 install \
# https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
# https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# Enable fedora-multimedia
dnf5 config-manager setopt fedora-multimedia.enabled=1 ||
dnf5 config-manager addrepo --from-repofile="https://negativo17.org/repos/fedora-multimedia.repo"
fi
# Set higher priority
dnf5 config-manager setopt fedora-multimedia.priority=90
# use override to replace mesa and others with less crippled versions
OVERRIDES=(
"intel-gmmlib"
"intel-mediasdk"
"intel-vpl-gpu-rt"
"libheif"
"libva"
"libva-intel-media-driver"
"mesa-dri-drivers"
"mesa-filesystem"
"mesa-libEGL"
"mesa-libGL"
"mesa-libgbm"
"mesa-va-drivers"
"mesa-vulkan-drivers"
)
dnf5 distro-sync --skip-unavailable -y --repo='fedora-multimedia' "${OVERRIDES[@]}"
dnf5 versionlock add "${OVERRIDES[@]}"
# Add Flathub to the image for eventual application
mkdir -p /etc/flatpak/remotes.d/
curl --retry 3 -Lo /etc/flatpak/remotes.d/flathub.flatpakrepo https://dl.flathub.org/repo/flathub.flatpakrepo
# 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
# 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 \
2>&1
# Add country query to all repo metalinks
# shellcheck disable=SC2016
sed -i -e '/^metalink\=/s/\$releasever\&arch\=\$basearch$/\$releasever\&arch\=\$basearch\&country\=KR,JP,AU/g' /etc/yum.repos.d/*.repo
# Add 1Password repo
#rpmkeys --import https://downloads.1password.com/linux/keys/1password.asc
cp /ctx/rpm-keys/1password.asc /etc/pki/rpm-gpg/1password.asc
sh -c 'echo -e "[1password]\nname=1Password Stable Channel\nbaseurl=https://downloads.1password.com/linux/rpm/stable/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\"file:///etc/pki/rpm-gpg/1password.asc\"" > /etc/yum.repos.d/1password.repo'
# Add Tailscale repo
#rpmkeys --import https://pkgs.tailscale.com/stable/fedora/repo.gpg
#dnf5 config-manager addrepo --from-repofile=https://pkgs.tailscale.com/stable/fedora/tailscale.repo
cp /ctx/rpm-keys/tailscale.gpg /etc/pki/rpm-gpg/tailscale.gpg
sh -c 'echo -e "[tailscale-stable]\nname=Tailscale stable\nbaseurl=https://pkgs.tailscale.com/stable/fedora/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\"file:///etc/pki/rpm-gpg/tailscale.gpg\"" > /etc/yum.repos.d/tailscale.repo'
# Install my own layered packages
dnf5 install -y \
fish \
gvfs-nfs \
openssl \
wl-clipboard \
ffmpeg ffmpeg-libs ffmpegthumbnailer \
heif-pixbuf-loader intel-vaapi-driver libavcodec libheif \
libcamera libcamera-gstreamer libcamera-ipa libcamera-tools pipewire-plugin-libcamera \
gnome-shell-extension-appindicator \
1password 1password-cli \
tailscale \
waypipe \
htop
cd /tmp
wget -O bitwarden.rpm "https://bitwarden.com/download/?app=desktop&platform=linux&variant=rpm"
dnf install -y ./bitwarden.rpm
# Update all existing packages
# dnf5 update -y

6
build_files/common/services.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
set -ouex pipefail
# Enable Tailscale service
systemctl enable tailscaled

12
build_files/common/setup.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
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
/ctx/common/packages.sh

15
build_files/gnome/build.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -ouex pipefail
/ctx/common/setup.sh
# Install Niri, the scrollable-tiling window compositor
# https://yalter.github.io/niri/
dnf5 -y copr enable avengemedia/dms
dnf5 -y install niri dms alacritty brightnessctl
dnf5 -y copr disable avengemedia/dms
/ctx/common/services.sh
echo "Done."

120
build_files/gnome/cleanup.sh Executable file
View File

@@ -0,0 +1,120 @@
#!/bin/bash
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
# 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.

20
build_files/niri/build.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -ouex pipefail
/ctx/common/setup.sh
# Install Niri, the scrollable-tiling window compositor
# https://yalter.github.io/niri/
dnf5 -y copr enable avengemedia/dms
# Install my own layered packages
dnf5 install -y \
alacritty \
niri dms
dnf5 -y copr disable avengemedia/dms
/ctx/common/services.sh
echo "Done."

120
build_files/niri/cleanup.sh Executable file
View File

@@ -0,0 +1,120 @@
#!/bin/bash
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
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

View File

@@ -0,0 +1,15 @@
[Unit]
Description=Add Flathub flatpak repositories. This replaces a service included by Fedora that normally installs their repo.
ConditionPathExists=!/var/lib/flatpak/.ublue-initialized
Before=flatpak-system-helper.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/flatpak remote-add --system --if-not-exists flathub /etc/flatpak/remotes.d/flathub.flatpakrepo
ExecStart=/usr/bin/flatpak remote-add --system --if-not-exists --disable --title "Fedora Flatpaks" fedora oci+https://registry.fedoraproject.org
ExecStart=/usr/bin/flatpak remote-add --system --if-not-exists --disable --title "Fedora Flatpaks (testing)" fedora-testing oci+https://registry.fedoraproject.org#testing
ExecStartPost=/usr/bin/touch /var/lib/flatpak/.ublue-initialized
[Install]
WantedBy=multi-user.target