Skip to content

Commit

Permalink
feat: add all packages and files
Browse files Browse the repository at this point in the history
  • Loading branch information
babariviere committed May 3, 2024
1 parent 19bfa6d commit 310ac97
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 11 deletions.
17 changes: 14 additions & 3 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# These allow changing the produced image by passing different build args to adjust
# the source from which your image is built.
# Build args can be provided on the commandline when building locally with:
# podman build -f Containerfile --build-arg FEDORA_VERSION=40 -t local-image
# podman build -f Containerfile --build-arg FEDORA_MAJOR_VERSION=40 -t local-image

# SOURCE_IMAGE arg can be anything from ublue upstream which matches your desired version:
# See list here: https://github.com/orgs/ublue-os/packages?repo_name=main
Expand All @@ -15,7 +15,7 @@
# - "base"
#
# "aurora", "bazzite", "bluefin" or "ucore" may also be used but have different suffixes.
ARG SOURCE_IMAGE="silverblue"
ARG SOURCE_IMAGE="base"

## SOURCE_SUFFIX arg should include a hyphen and the appropriate suffix name
# These examples all work for silverblue/kinoite/sericea/onyx/lazurite/vauxite/base
Expand All @@ -33,25 +33,36 @@ ARG SOURCE_IMAGE="silverblue"
# - stable-zfs
# - stable-nvidia-zfs
# - (and the above with testing rather than stable)
ARG SOURCE_SUFFIX="-main"
ARG SOURCE_SUFFIX="-nvidia"

## SOURCE_TAG arg must be a version built for the specific image: eg, 39, 40, gts, latest
ARG SOURCE_TAG="latest"

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"

### 2. SOURCE IMAGE
## this is a standard Containerfile FROM using the build ARGs above to select the right upstream image
FROM ghcr.io/ublue-os/${SOURCE_IMAGE}${SOURCE_SUFFIX}:${SOURCE_TAG}

ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"

### 3. 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.

COPY --from=ghcr.io/ublue-os/config:latest /files/ublue-os-just /
COPY --from=ghcr.io/ublue-os/config:latest /files/ublue-os-udev-rules /
COPY --from=ghcr.io/ublue-os/config:latest /files/ublue-os-update-services /
COPY --from=ghcr.io/ublue-os/bluefin:latest /usr/share/fish /usr/share/fish
COPY files /
COPY build.sh /tmp/build.sh
COPY packages /tmp/packages

RUN mkdir -p /var/lib/alternatives && \
/tmp/build.sh && \
fc-cache --system-only --really-force --verbose && \
mkdir -p /var/tmp && \
chmod -R 1777 /var/tmp && \
ostree container commit
## NOTES:
# - /var/lib/alternatives is required to prevent failure with some RPM installs
Expand Down
22 changes: 14 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,26 @@ set -ouex pipefail

RELEASE="$(rpm -E %fedora)"

### Add repos

### Install packages
# Add Staging repo
curl -Lo /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo

# Add Bling repo
curl -Lo /etc/yum.repos.d/ublue-os-bling-fedora-"${FEDORA_MAJOR_VERSION}".repo https://copr.fedorainfracloud.org/coprs/ublue-os/bling/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-bling-fedora-"${FEDORA_MAJOR_VERSION}".repo

curl -Lo /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo https://copr.fedorainfracloud.org/coprs/ganto/lxc4/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo

# 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
curl -Lo /etc/yum.repos.d/_copr_che-nerd-fonts-"${FEDORA_MAJOR_VERSION}".repo https://copr.fedorainfracloud.org/coprs/che/nerd-fonts/repo/fedora-"${FEDORA_MAJOR_VERSION}"/che-nerd-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo

### Install packages

# this installs a package from fedora repos
rpm-ostree install screen
grep -v '^#' /tmp/packages | xargs rpm-ostree install

# this would install a package from rpmfusion
# rpm-ostree install vlc

#### Example for enabling a System Unit File
#### Services

systemctl enable podman.socket
systemctl enable tailscaled.service
4 changes: 4 additions & 0 deletions cosign.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEG8A6iUv3QkDjv8o9Bjq1xhsWr/fo
JXdGPebPTfZQpX/zMdP32WenP6s8kSdlfGI3c2nqM3EWOTebfjrH4O3NbQ==
-----END PUBLIC KEY-----
6 changes: 6 additions & 0 deletions files/etc/yum.repos.d/docker-ce.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
8 changes: 8 additions & 0 deletions files/etc/yum.repos.d/tailscale.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[tailscale-stable]
name=Tailscale stable
baseurl=https://pkgs.tailscale.com/stable/fedora/$basearch
enabled=1
type=rpm
repo_gpgcheck=0
gpgcheck=0
gpgkey=https://pkgs.tailscale.com/stable/fedora/repo.gpg
84 changes: 84 additions & 0 deletions packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Compositor
xorg-x11-server-Xwayland
river

# apps
foot
mako
waybar
kanshi
fuzzel

# fonts
nerd-fonts
fontawesome-fonts-all

# lock
swayidle
swaylock

# utility
slurp
grimshot
wev
wl-clipboard
brightnessctl
wlr-randr

# portal
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk

# containers
docker-ce
docker-ce-cli
docker-buildx-plugin
docker-compose-plugin
incus
incus-agent
podman
podman-compose
podman-tui
podmansh

# emulation
libvirt
qemu-char-spice
qemu-device-display-virtio-gpu
qemu-device-display-virtio-vga
qemu-device-usb-redirect
qemu-img
qemu-system-x86-core
qemu-user-binfmt
qemu-user-static
qemu
virt-manager
virt-viewer

# env
polkit
xdg-user-dirs
dbus-tools
dbus-daemon
vulkan-tools

# networking
network-manager-applet
bluez
bluez-tools
blueman
tailscale
wireguard-tools

# sound
pipewire
wireplumber
pamixer

# shell
fish
zsh

# classic dev tools
gcc
make

0 comments on commit 310ac97

Please sign in to comment.