Skip to content

Commit

Permalink
Merge branch 'live' into template
Browse files Browse the repository at this point in the history
  • Loading branch information
xynydev authored Dec 17, 2023
2 parents d124a99 + e83bacd commit 07a432d
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 14 deletions.
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Starting point
# linuXYZ

> **Warning**
> Startingpoint was recently rewritten, and this version is considered a "1.0" *semi-*stable release.
> There are breaking changes between this and the previous version.
> If you are merging changes from the previous (v0) version, please refer to [the heads-up blog post](https://universal-blue.org/blog/2023/09/02/startingpoint-rewrite-heads-up-what-you-need-to-know/).
[![build-ublue](https://github.com/ublue-os/startingpoint/actions/workflows/build.yml/badge.svg)](https://github.com/ublue-os/startingpoint/actions/workflows/build.yml)
[![build-ublue](https://github.com/einohr/linuxyz/actions/workflows/build.yml/badge.svg)](https://github.com/einohr/linuxyz/actions/workflows/build.yml)

This is a constantly updating template repository for creating [a native container image](https://fedoraproject.org/wiki/Changes/OstreeNativeContainerStable) designed to be customized however you want. GitHub will build your image for you, and then host it for you on [ghcr.io](https://github.com/features/packages). You then just tell your computer to boot off of that image. GitHub keeps 90 days worth image backups for you, thanks Microsoft!

Expand All @@ -20,7 +20,7 @@ Don't worry, it only requires some basic knowledge about using the terminal and
After setup, it is recommended you update this README to describe your custom image.

> **Note**
> Everywhere in this repository, make sure to replace `ublue-os/startingpoint` with the details of your own repository. Unless you used one of the automatic repository setup tools in which case the previous repo identifier should already be your repo's details.
> Everywhere in this repository, make sure to replace `ublue-os/startingpoint` with the details of your own repository. Unless you used [`create-ublue-image`](https://github.com/EinoHR/create-ublue-image), in which case the previous repo identifier should already be your repo's details.
> **Warning**
> To start, you *must* create a branch called `live` which is exclusively for your customizations. That is the **only** branch the GitHub workflow will deploy to your container registry. Don't make any changes to the original "template" branch. It should remain untouched. By using this branch structure, you ensure a clear separation between your own "published image" branch, your development branches, and the original upstream "template" branch. Periodically sync and fast-forward the upstream "template" branch to the most recent revision. Then, simply rebase your `live` branch onto the updated template to effortlessly incorporate the latest improvements into your own repository, without the need for any messy, manual "merge commits".
Expand All @@ -46,15 +46,15 @@ To rebase an existing Silverblue/Kinoite installation to the latest build:

- First rebase to the unsigned image, to get the proper signing keys and policies installed:
```
rpm-ostree rebase ostree-unverified-registry:ghcr.io/ublue-os/startingpoint:latest
sudo rpm-ostree rebase ostree-unverified-registry:ghcr.io/xynydev/linuxyz:latest
```
- Reboot to complete the rebase:
```
systemctl reboot
```
- Then rebase to the signed image, like so:
```
rpm-ostree rebase ostree-image-signed:docker://ghcr.io/ublue-os/startingpoint:latest
sudo rpm-ostree rebase ostree-image-signed:docker://ghcr.io/xynydev/linuxyz:latest
```
- Reboot again to complete the installation
```
Expand All @@ -64,7 +64,7 @@ To rebase an existing Silverblue/Kinoite installation to the latest build:
This repository builds date tags as well, so if you want to rebase to a particular day's build:

```
rpm-ostree rebase ostree-image-signed:docker://ghcr.io/ublue-os/startingpoint:20230403
sudo rpm-ostree rebase ostree-unverified-registry:ghcr.io/xynydev/linuxyz:20230403
```

This repository by default also supports signing.
Expand Down Expand Up @@ -95,4 +95,25 @@ Then type `just` to list the just recipes available.

The file `/usr/share/ublue-os/just/custom.just` is intended for the custom just commands (recipes) you wish to include in your image. By default, it includes the justfiles from [`ublue-os/bling`](https://github.com/ublue-os/bling), if you wish to disable that, you need to just remove the line that includes bling.just.

See [the just-page in the Universal Blue documentation](https://universal-blue.org/guide/just/) for more information.
- `just` - Show all tasks, more will be added in the future
- `just bios` - Reboot into the system bios (Useful for dualbooting)
- `just changelogs` - Show the changelogs of the pending update
- Set up distroboxes for the following images:
- `just distrobox-boxkit`
- `just distrobox-debian`
- `just distrobox-opensuse`
- `just distrobox-ubuntu`
- `just setup-flatpaks` - Install all of the flatpaks declared in recipe.yml
- `just setup-gaming` - Install Steam, Heroic Game Launcher, OBS Studio, Discord, Boatswain, Bottles, and ProtonUp-Qt. MangoHud is installed and enabled by default, hit right Shift-F12 to toggle
- `just nix-me-up` - Install Nix with dnkmmr69420's Nix Silverblue install script
- `just update` - Update rpm-ostree, flatpaks, and distroboxes in one command

Check the [just website](https://just.systems) for tips on modifying and adding your own recipes.

## Verification

These images are signed with sisgstore's [cosign](https://docs.sigstore.dev/cosign/overview/). You can verify the signature by downloading the `cosign.pub` key from this repo and running the following command:

cosign verify --key cosign.pub ghcr.io/xynydev/linuxyz

If you're forking this repo, the uBlue website has [instructions](https://ublue.it/making-your-own/) for setting up signing properly.
10 changes: 10 additions & 0 deletions config/files/usr/lib/systemd/system/mount-on-boot.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Hack to mount all network shares automagically.
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=mount -a

[Install]
WantedBy=multi-user.target
29 changes: 29 additions & 0 deletions config/files/usr/share/ublue-os/just/60-custom.just
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
!include 100-bling.just

# Include some of your custom scripts here!

# https://github.com/essembeh/gnome-extensions-cli
setup-gext:
pip install --upgrade gnome-extensions-cli
# vitals
gext install 1460
# gsconnect
gext install 1319
# arcmenu
gext install 3628
# burn-my-windows
gext install 4679
# user themes
gext install 19
# space bar
gext install 5090
# forge
gext install 4481
# rounded window corners
gext install 5237

workspace-shortcuts:
#!/usr/bin/env bash
for i in {1..9}; do
gsettings set org.gnome.shell.keybindings switch-to-application-$i '[]'
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-$i "['<Super>$i']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-$i "['<Shift><Super>$i']"
done
63 changes: 58 additions & 5 deletions config/recipe.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# image will be published to ghcr.io/<user>/<name>
name: startingpoint
name: linuxyz
# description will be included in the image's metadata
description: A starting point for further customization of uBlue images. Make your own! https://ublue.it/making-your-own/
description: My personal uBlue image. Make your own! https://ublue.it/making-your-own/

# the base image to build on top of (FROM) and the version tag to use
base-image: ghcr.io/ublue-os/silverblue-main
image-version: 39 # latest is also supported if you want new updates ASAP
base-image: ghcr.io/ublue-os/silverblue-nvidia
image-version: latest # latest is also supported if you want new updates ASAP

# module configuration, executed in order
# you can include multiple instances of the same module
Expand All @@ -22,10 +22,39 @@ modules:

- type: rpm-ostree
repos:
# - https://copr.fedorainfracloud.org/coprs/atim/starship/repo/fedora-%OS_VERSION%/atim-starship-fedora-%OS_VERSION%.repo
- https://copr.fedorainfracloud.org/coprs/atim/starship/repo/fedora-%OS_VERSION%/atim-starship-fedora-%OS_VERSION%.repo
- https://pkgs.tailscale.com/stable/fedora/tailscale.repo
install:
# - micro
# - starship
- python
- rsync
- syncthing
- kitty
- starship
- zsh
- fish
- rEFInd
- qemu
- libvirt
- virt-manager
- virt-install
- tailscale

- pcmanfm
- thunar
- nemo

# - gnome-shell-extension-pop-shell
# - xprop
- gnome-shell-extension-blur-my-shell
# - gnome-shell-extension-forge

# - bismuth

# - ulauncher
# - fzf
# - btop
remove:
- firefox # default firefox removed in favor of flatpak
- firefox-langpacks # langpacks needs to also be removed to prevent dependency problems
Expand Down Expand Up @@ -55,4 +84,28 @@ modules:
- type: script
scripts:
# this sets up the proper policy & signing files for signed images to work
- rescrobbled.sh
- signing.sh

- type: systemd
system:
enabled:
- mount-on-boot.service

- type: fonts
fonts:
nerd-fonts:
- FiraCode # don't add "Nerd Font" suffix.
- Hack
- SourceCodePro
- Terminus
- JetBrainsMono
- NerdFontsSymbolsOnly
- SpaceMono
google-fonts:
- Roboto
- Open Sans
- Work Sans
- Outfit
- Space Grotesk

15 changes: 15 additions & 0 deletions config/scripts/rescrobbled.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -oue pipefail

echo "Downloading latest rescrobbled binary"
curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/InputUsername/rescrobbled/releases/latest \
| jq .assets[0].browser_download_url \
| xargs wget -O /usr/bin/rescrobbled
chmod +x /usr/bin/rescrobbled

echo "Downloading rescrobbled systemd unit"
curl https://raw.githubusercontent.com/InputUsername/rescrobbled/master/rescrobbled.service > /tmp/rescrobbled.service
sed 's/ExecStart=.*/ExecStart=\/usr\/bin\/rescrobbled/' /tmp/rescrobbled.service > /usr/lib/systemd/user/rescrobbled.service

echo "Enabling rescrobbled systemd unit"
systemctl enable --global -f rescrobbled.service
4 changes: 2 additions & 2 deletions cosign.pub
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7lh7fJMV4dBT2jT1XafixUJa7OVA
cT+QFVD8IfIJIS/KBAc8hx1aslzkH3tfeM0cwyCLB7kOStZ4sh6RyFQD9w==
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEO87Op1qSvlZb21Z5kLKoGy6OQIj
LL1OXUzbFXg5iLXvLKMLDG/8a+vNG+Mk8cG2Hy/Uo9cjd//m+ljubo3NGA==
-----END PUBLIC KEY-----

0 comments on commit 07a432d

Please sign in to comment.