-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TODO: - README.md: update for bootc commands
- Loading branch information
0 parents
commit dd5e333
Showing
7 changed files
with
281 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: build | ||
|
||
on: | ||
workflow_dispatch: | ||
# TODO: schedule | ||
|
||
env: | ||
tag: ghcr.io/${{ github.repository_owner }}/workstation-bootc:latest | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
packages: write | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build | ||
run: sudo podman build -t ${{ env.tag }} . | ||
|
||
- name: Log in to container registry | ||
run: sudo podman login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io | ||
|
||
- name: Push container | ||
run: sudo podman push ${{ env.tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIGXjCCBEagAwIBAgIEeIXl3TANBgkqhkiG9w0BAQwFADCBozELMAkGA1UEBhMC | ||
VVMxFzAVBgNVBAgMDk5vcnRoIENhcm9saW5hMRAwDgYDVQQHDAdSYWxlaWdoMRYw | ||
FAYDVQQKDA1SZWQgSGF0LCBJbmMuMRMwEQYDVQQLDApSZWQgSGF0IElUMRkwFwYD | ||
VQQDDBBJbnRlcm5hbCBSb290IENBMSEwHwYJKoZIhvcNAQkBFhJpbmZvc2VjQHJl | ||
ZGhhdC5jb20wIBcNMjIwNDEwM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VR0OBBYEFLX6jeUKeKEJldtNIYaVallPSciLMB8GA1UdIwQYMBaAFLX6jeUKeKEJ | ||
ldtNIYaVallPSciLMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMC8G | ||
A1UdHwQoMCYwJKAioCCGHmh0dHA6Ly9vc2NwLnJlZGhhdC5jb20vY3JsLnBlbTAN | ||
BgkqhkiG9w0BAQwFAAOCAgEAr4RGb1FvUb0kqCbwNlEUwC0vqcdG/uJA38UL4vNa | ||
RgrUZOz8LlE1UywZacvLxpYY5G6duJgB6X6NxN98PV8ei5eYRp5pEyUXIaAl0vvT | ||
WQ+mr+nizbGCeRjnk1rAI9s9P/ho/uRq06l9upEJvgIotOb9+KY1ljBxstl00Egb | ||
4B+gjR6wDHwaHb9wKgNB7xgSRBqwJ84eLtK1UoXtYpVTDe9nHiqzVb9JfYA8rscM | ||
quPqLXeqKDJ/SP72vlM3BocY6HqQ7l9kV8Bbk0BmnBwHTPe1uiuiW61oRYT0dv8L | ||
RLoswGZGSar14HId8tZ3EGTNfGvrTkhBI6bjjSGs+0MDcv6ARAZF0JSH6YWTRRGK | ||
oGV5x2vE6zPXvaejzNzN5aTK9qspOK4QM/bM+DFxl3HvKWsm5urJZnCCrf+pSRC2 | ||
crzoBtmKR6TQIzYbMSu6jfc8xOKCR30LJ+wlZ/LuEZmroSp5xc6Ixeg5FV6w4h4m | ||
eNlQFU9n5AJyCG3ThQBhahfK4vtOtjYZXrtJ5VFaMlG26xzavVDRppYp3taLtiNi | ||
qChV/dbSdc7HqYQOnDglUF5mRiu78uZ9+fl5OgE4PjHVG/exyqi6OQZeujPzBXL7 | ||
gZ1WEVt+fV8FWaH/NaEvVu5EFhISI/2dM+y/nuRQ4n2IwauEAWCQ+o6Qdq8TXytp | ||
70A= | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM quay.io/fedora/fedora-bootc:40 | ||
|
||
COPY packages.sh / | ||
COPY 2022-RH-IT-Root-CA.pem /etc/pki/ca-trust/source/anchors/ | ||
COPY rpmfusion.repo /etc/yum.repos.d/ | ||
RUN /packages.sh; rm /packages.sh | ||
|
||
COPY config.sh / | ||
RUN /config.sh; rm /config.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Martin Pitt's desktop | ||
===================== | ||
|
||
This is an [rpm-ostree](https://coreos.github.io/rpm-ostree/) and | ||
[bootc](https://docs.fedoraproject.org/en-US/bootc/) based minimal | ||
[Fedora](https://getfedora.org/) developer desktop with the [sway window manager](https://swaywm.org/) and [podman](https://podman.io/)/[toolbox](https://docs.fedoraproject.org/en-US/fedora-silverblue/toolbox/) for doing development and running less common graphical applications. | ||
|
||
It gets [automatically built](.github/workflows/build.yml) every week and [published as container image](https://github.com/martinpitt/ostree-bootc/pkgs/container/workstation-bootc), for using with [ostree native containers](https://coreos.github.io/rpm-ostree/container/). | ||
|
||
To use it from an existing OSTree based system like [Fedora CoreOS](https://getfedora.org/coreos) or [Fedora Silverblue](https://docs.fedoraproject.org/en-US/fedora-silverblue/), rebase your tree to it: | ||
|
||
```sh | ||
sudo rpm-ostree rebase ostree-unverified-registry:ghcr.io/martinpitt/workstation-bootc | ||
``` | ||
|
||
After that, you can install weekly updates with | ||
|
||
``` | ||
sudo rpm-ostree upgrade | ||
``` | ||
|
||
If anything goes wrong, you can go back to the previous version with `sudo rpm-ostree rollback`. | ||
|
||
Login | ||
----- | ||
|
||
There is no graphical login manager. I log in on VT1, and my `.bashrc` | ||
automatically starts the GNOME SSH agent and sway: | ||
|
||
```sh | ||
if [ "$(tty)" = "/dev/tty1" ]; then | ||
export `gnome-keyring-daemon --start --components=ssh` | ||
export BROWSER=firefox-wayland | ||
export XDG_CURRENT_DESKTOP=sway | ||
exec sway > $XDG_RUNTIME_DIR/sway.log 2>&1 | ||
fi | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
set -xeuo pipefail | ||
|
||
# Enable SysRQ | ||
echo 'kernel.sysrq = 1' > /usr/lib/sysctl.d/90-sysrq.conf | ||
|
||
# power saving | ||
echo 'blacklist e1000e' > /usr/lib/modprobe.d/blacklist-local.conf | ||
|
||
# set up PAM for systemd-homed | ||
authselect enable-feature with-systemd-homed | ||
|
||
# homed is missing a lot of SELinux policy (https://bugzilla.redhat.com/show_bug.cgi?id=1809878) | ||
sed -i 's/SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config | ||
|
||
# enable other units | ||
ln -s ../systemd-timesyncd.service /usr/lib/systemd/system/sysinit.target.wants/systemd-timesyncd.service | ||
ln -s ../cockpit.socket /usr/lib/systemd/system/sockets.target.wants/cockpit.socket | ||
|
||
# disable unwanted services | ||
ln -sfn /dev/null /usr/lib/systemd/user/at-spi-dbus-bus.service | ||
|
||
# move OS systemd unit defaults to /usr | ||
cp -a --verbose /etc/systemd/system /etc/systemd/user /usr/lib/systemd/ | ||
rm -r /etc/systemd/system /etc/systemd/user | ||
|
||
# scanner permissions without scanner packages | ||
echo 'ACTION=="add|change", ENV{DEVTYPE}=="usb_device", ENV{ID_MODEL}=="CanoScan", MODE="666"' > /usr/lib/udev/rules.d/canoscan.rules | ||
|
||
# battery health | ||
echo 'ACTION=="add|change", ATTR{type}=="Battery", ATTR{charge_stop_threshold}="80"' > /usr/lib/udev/rules.d/80-battery-health.rules | ||
|
||
# update for Red Hat certificate | ||
ln -s /etc/pki/ca-trust/source/anchors/2022-RH-IT-Root-CA.pem /etc/pki/tls/certs/2022-RH-IT-Root-CA.pem | ||
update-ca-trust |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
#!/bin/sh | ||
set -eux | ||
|
||
# hardware/drivers | ||
dnf install -y \ | ||
kernel-modules-extra \ | ||
iwlwifi-mvm-firmware \ | ||
alsa-sof-firmware \ | ||
NetworkManager-wifi \ | ||
NetworkManager-openvpn-gnome \ | ||
powertop \ | ||
wpa_supplicant | ||
|
||
# shell tools and development | ||
dnf install -y \ | ||
cockpit-system \ | ||
cockpit-ws \ | ||
cyrus-sasl-plain \ | ||
fpaste \ | ||
git \ | ||
glibc-langpack-de \ | ||
glibc-langpack-en \ | ||
isync \ | ||
krb5-workstation \ | ||
man-db \ | ||
mtr \ | ||
mutt \ | ||
neovim \ | ||
nmap-ncat \ | ||
restic \ | ||
rsync \ | ||
strace \ | ||
syncthing \ | ||
systemd-container \ | ||
toolbox \ | ||
tree \ | ||
w3m \ | ||
wget | ||
|
||
# desktop plumbing/apps | ||
dnf install -y \ | ||
dejavu-sans-fonts \ | ||
dejavu-serif-fonts \ | ||
dejavu-sans-mono-fonts \ | ||
flatpak \ | ||
fontawesome-fonts \ | ||
google-noto-emoji-color-fonts \ | ||
gvfs-mtp \ | ||
pulseaudio-utils \ | ||
alsa-plugins-pulseaudio \ | ||
gstreamer1-plugins-good \ | ||
gstreamer1-plugins-bad-free \ | ||
gstreamer1-plugin-openh264 \ | ||
gstreamer1-libav \ | ||
libavdevice \ | ||
xdg-desktop-portal-gtk \ | ||
pavucontrol \ | ||
pcmanfm \ | ||
nm-connection-editor \ | ||
eog \ | ||
evince \ | ||
rhythmbox \ | ||
gnome-keyring \ | ||
pinentry-gnome3 \ | ||
mate-polkit \ | ||
lxterminal \ | ||
gnome-disk-utility \ | ||
rofimoji | ||
|
||
# sway/wayland desktop | ||
dnf install -y \ | ||
sway \ | ||
swayidle \ | ||
swaylock \ | ||
kanshi \ | ||
mako \ | ||
waybar \ | ||
slurp \ | ||
grim \ | ||
xorg-x11-server-Xwayland \ | ||
firefox \ | ||
wofi \ | ||
brightnessctl \ | ||
wl-clipboard | ||
|
||
dnf remove -y \ | ||
NetworkManager-cloud-setup \ | ||
adcli \ | ||
avahi \ | ||
btrfs-progs \ | ||
chrony \ | ||
cloud-utils-growpart \ | ||
fwupd \ | ||
libosinfo \ | ||
lvm2 \ | ||
lvm2-libs \ | ||
nfs-utils \ | ||
nilfs-utils \ | ||
passim-libs \ | ||
quota-nls \ | ||
rpcbind \ | ||
sssd-common \ | ||
sssd-nfs-idmap \ | ||
sos \ | ||
tracker \ | ||
tracker-miners \ | ||
udftools \ | ||
vim-data \ | ||
vim-minimal \ | ||
xdg-desktop-portal-wlr \ | ||
zram-generator | ||
|
||
rpm -qa 'qemu-user-static*' | xargs dnf remove -y | ||
|
||
dnf clean all | ||
|
||
rpm -e --verbose dnf dnf-data python3-dnf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[rpmfusion-free] | ||
name=RPM Fusion for Fedora $releasever - Free | ||
#baseurl=http://download1.rpmfusion.org/free/fedora/releases/$releasever/Everything/$basearch/os/ | ||
metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-40&arch=$basearch | ||
enabled=1 | ||
metadata_expire=14d | ||
type=rpm-md | ||
gpgcheck=0 | ||
|
||
[rpmfusion-free-updates] | ||
name=RPM Fusion for Fedora $releasever - Free - Updates | ||
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/$basearch/ | ||
metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-updates-released-40&arch=$basearch | ||
enabled=1 | ||
enabled_metadata=1 | ||
type=rpm-md | ||
gpgcheck=0 | ||
repo_gpgcheck=0 |