Skip to content

Commit

Permalink
Define tree for pitti's workstation
Browse files Browse the repository at this point in the history
Also add helper script for running the ostree build.
  • Loading branch information
martinpitt committed Dec 18, 2024
1 parent 9bc27fe commit 6d91264
Show file tree
Hide file tree
Showing 11 changed files with 395 additions and 5 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: build
on:
schedule:
- cron: 0 2 * * 6
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 40
container:
image: docker.io/fedora:latest
# Fix SELinux for the built OSTree: https://github.com/coreos/rpm-ostree/issues/1943
options: --privileged --security-opt label:disable
steps:
- name: Install dependencies
run: dnf install -y rpm-ostree selinux-policy selinux-policy-targeted policycoreutils podman overlayfs-tools fuse-overlayfs

- name: Clone repository
uses: actions/checkout@v4

- name: Log into container registry
run: podman login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io

- name: Build OSTree and push it to registry
run: ./compose.sh registry
25 changes: 25 additions & 0 deletions 2015-RH-IT-Root-CA.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-----BEGIN CERTIFICATE-----
MIIENDCCAxygAwIBAgIJANunI0D662cnMA0GCSqGSIb3DQEBCwUAMIGlMQswCQYD
VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExEDAOBgNVBAcMB1JhbGVp
Z2gxFjAUBgNVBAoMDVJlZCBIYXQsIEluYy4xEzARBgNVBAsMClJlZCBIYXQgSVQx
GzAZBgNVBAMMElJlZCBIYXQgSVQgUm9vdCBDQTEhMB8GCSqGSIb3DQEJARYSaW5m
b3NlY0ByZWRoYXQuY29tMCAXDTE1MDcwNjE3MzgxMVoYDzIwNTUwNjI2MTczODEx
WjCBpTELMAkGA1UEBhMCVVMxFzAVBgNVBAgMDk5vcnRoIENhcm9saW5hMRAwDgYD
VQQHDAdSYWxlaWdoMRYwFAYDVQQK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ions & 0 deletions 2022-RH-IT-Root-CA.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
-----BEGIN CERTIFICATE-----
MIIGXjCCBEagAwIBAgIEeIXl3TANBgkqhkiG9w0BAQwFADCBozELMAkGA1UEBhMC
VVMxFzAVBgNVBAgMDk5vcnRoIENhcm9saW5hMRAwDgYDVQQHDAdSYWxlaWdoMRYw
FAYDVQQKDA1SZWQgSGF0LCBJbmMuMRMwEQYDVQQLDApSZWQgSGF0IElUMRkwFwYD
VQQDDBBJbnRlcm5hbCBSb290IENBMSEwHwYJKoZIhvcNAQkBFhJpbmZvc2VjQHJl
ZGhhdC5jb20wIBcNMjIwNDEwMTMxNzE4WhgPMjA1MjA0MDIxMzE3MThaMIGjMQsw
CQYDVQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExEDAOBgNVBAcMB1Jh
bGVpZ2gxFjAUBgNVBAoMDVJlZCBIYXQsIEluYy4xEzARBgNVBAsMClJlZCBIYXQg
SVQxGTAXBgNVBAMMEEludGVybmFsIFJvb3QgQ0ExITAfBgkqhkiG9w0BCQEWEmlu
Zm9zZWNAcmVkaGF0LmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB
ALG6WgRWCXNZdn0UUVQ5JV2lEgHaNblgGnCAx6bZ89l5Ygi+tVDo8v1c16cM5e4E
dtKEP88CnGL+6NJnI4iMuw2HtYM77Q2qmR9PIH3BRgCHHcZMgZjvlFKjJnLXIptk
NMq/6tJ+6L0iWy0AzPovc5AtkRL3MBgrwgKINTBN41nuq4Dqp/QpqbYvK4Fz9uUE
jtYUs4YZZjXfk/U5RcmCclSwyGdgxOC9lDInY/t4tCmJHxM6vlkjoJhqmLIbrgue
Sv+uwAuNLGhSjT1hqLUJU7rpUUn9eAw23ebNC0sMw9eIpS7CwGyC+jhC8uORdgiK
L79hDJBrKmwpy0byZ58qRNPWREMqPgs11NFGB3m1yj5vj47/i6m3yYizHX61t0ws
0YTPcm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rtJ5VFaMlG26xzavVDRppYp3taLtiNi
qChV/dbSdc7HqYQOnDglUF5mRiu78uZ9+fl5OgE4PjHVG/exyqi6OQZeujPzBXL7
gZ1WEVt+fV8FWaH/NaEvVu5EFhISI/2dM+y/nuRQ4n2IwauEAWCQ+o6Qdq8TXytp
70A=
-----END CERTIFICATE-----
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
Martin Pitt's desktop
=====================

This is an [rpm-ostree](https://coreos.github.io/rpm-ostree/) 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-pitti-workstation/pkgs/container/workstation-ostree-config), 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-ostree-config
```

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
```

Original README for [workstation-ostree-config](https://pagure.io/workstation-ostree-config)
=============================================

# Manifests for Fedora Atomic Desktops variants

This is the configuration needed to create
Expand Down
8 changes: 3 additions & 5 deletions common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ container-cmd:
- /usr/bin/bash

include:
# Packages common to all variants
- common-packages.yaml
# See: https://gitlab.com/fedora/ostree/sig/-/issues/1
- bootupd.yaml
# Dracut configuration for the initramfs
Expand Down Expand Up @@ -104,9 +102,9 @@ packages-x86_64:
exclude-packages:
- PackageKit
# We can not include openh264. See https://fedoraproject.org/wiki/OpenH264
- gstreamer1-plugin-openh264
- mozilla-openh264
- openh264
# - gstreamer1-plugin-openh264
# - mozilla-openh264
# - openh264
# Do not include dnf4. Classic ostree also exclude dnf5 in another manifest
- dnf
- dnf-plugins-core
Expand Down
21 changes: 21 additions & 0 deletions compose.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
set -eu
CACHE=/var/cache/ostree
REPO=/var/tmp/repo
# default to storing locally; can also be "registry:" to directly push
SKOPEO_TARGET="${1:-containers-storage}"

mkdir -p $CACHE

if [ ! -d $REPO/objects ]; then
ostree --repo=$REPO init --mode=archive-z2
fi

rpm-ostree compose tree --unified-core --cachedir=$CACHE --repo=$REPO pitti-desktop.yaml
# HACK: networking in GitHub is a bit flaky, retry a few times
for retry in $(seq 3); do
rpm-ostree compose container-encapsulate --repo=$REPO pitti-desktop ${SKOPEO_TARGET}:ghcr.io/martinpitt/workstation-ostree-config:latest && exit 0
[ "$SKOPEO_TARGET" = registry ] || break
sleep 30
done
exit 1
7 changes: 7 additions & 0 deletions fedora-41-updates.repo
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f41&
enabled=1
gpgcheck=1
metadata_expire=1d

[fedora-41-updates-testing]
name=Fedora 41 $basearch Updates
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f41&arch=$basearch
enabled=1
gpgcheck=1
metadata_expire=1d
9 changes: 9 additions & 0 deletions fedora-cisco-openh264.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[fedora-cisco-openh264]
name=Fedora 41 openh264 (From Cisco) - $basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-41&arch=$basearch
type=rpm
enabled=1
metadata_expire=14d
repo_gpgcheck=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-41-$basearch
154 changes: 154 additions & 0 deletions pitti-desktop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
variables:
bootable_container: false

include: common.yaml

ref: pitti-desktop
rojig:
name: pitti-desktop
summary: "Pitti Desktop"
license: MIT

repos:
- fedora-41
- fedora-41-updates
- fedora-cisco-openh264
- rpmfusion-free
- rpmfusion-free-updates

packages:
# hardware/drivers
- kernel
- kernel-modules-extra
- iwlwifi-mvm-firmware
- alsa-sof-firmware
- NetworkManager-wifi
- NetworkManager-openvpn-gnome
- powertop
- wpa_supplicant
- bluez
- bluez-tools
# basic system
- acl
- attr
- basesystem
- cryptsetup
- dnsmasq
- fedora-workstation-backgrounds
- filesystem
- glibc-langpack-de
- glibc-langpack-en
- hostname
- iproute
- kbd
- nss-altfiles
- pciutils
- rpm-ostree
# don't care, but rpm-ostree build fails otherwise
- selinux-policy-targeted
- sudo
- usbutils
# shell tools and development
- bash-completion
- bc
- bzip2
# authenticate to gmail
- cyrus-sasl-plain
- fpaste
- git
- gnupg2
- isync
- krb5-workstation
- lsof
- man-db
- mtr
- mutt
- neovim
- nmap-ncat
- openssh-server
- openvpn
- podman
- restic
- rsync
- strace
- syncthing
- systemd-container
- toolbox
- tree
- w3m
- weechat
- wget

# desktop plumbing/apps
- dejavu-sans-fonts
- dejavu-serif-fonts
- dejavu-sans-mono-fonts
- 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
# for wf-recorder
- libavdevice
- xdg-desktop-portal-gtk

- pavucontrol
- pcmanfm
- nm-connection-editor
- blueman
- eog
- evince
- rhythmbox
- gnome-keyring
- pinentry-gnome3
- mate-polkit
- lxterminal
- gnome-disk-utility
- rofimoji

# sway/wayland desktop
- sway
- swayidle
- swaylock
- kanshi
- mako
- waybar
- slurp
- grim
- xorg-x11-server-Xwayland
- firefox
- wofi
- brightnessctl
- wl-clipboard

exclude-packages:
# recommended by sway
- alacritty
- brltty
- glibc-all-langpacks
# recommended by gtk3
- tracker
- tracker-miners
# recommended by toolbox
- subscription-manager
# recommended by udisks
- exfatprogs
- f2fs-tools
- btrfs-progs
- nilfs-utils
- udftools
# does not work
- xdg-desktop-portal-wlr
# recommended by containers-common-extra
- qemu-user-static

add-files:
- ["2015-RH-IT-Root-CA.pem", "/etc/pki/ca-trust/source/anchors/2015-RH-IT-Root-CA.pem"]
- ["2022-RH-IT-Root-CA.pem", "/etc/pki/ca-trust/source/anchors/2022-RH-IT-Root-CA.pem"]

postprocess-script: pitti-post.sh
Loading

0 comments on commit 6d91264

Please sign in to comment.