Skip to content

Commit 929f5b2

Browse files
committed
Revise README to introduce project description, focus, inspiration and usage instructions
1 parent d29acdc commit 929f5b2

1 file changed

Lines changed: 33 additions & 282 deletions

File tree

README.md

Lines changed: 33 additions & 282 deletions
Original file line numberDiff line numberDiff line change
@@ -1,306 +1,57 @@
1-
# image-template
1+
# Dank Linux Bluefin: Universal Blue's Bluefin + Dank Material Shell with Niri
22

3-
This repository is meant to be a template for building your own custom [bootc](https://github.com/bootc-dev/bootc) image. This template is the recommended way to make customizations to any image published by the Universal Blue Project.
3+
This repository builds a custom Universal Blue's Bluefin bootc image including Dank Material Shell and Niri. The goal of this project is to provide a native-feeling Dank Material Shell with Niri experience on an immutable Fedora-based image, while staying close to the Universal Blue ecosystem. Starting from the Universal Blue image template repository, it is shaped into a project-specific bootc image that simply includes Dank Material Shell, Niri, and related assets in the immutable operating system.
44

5-
# Community
5+
## Project focus
66

7-
If you have questions about this template after following the instructions, try the following spaces:
8-
- [Universal Blue Forums](https://universal-blue.discourse.group/)
9-
- [Universal Blue Discord](https://discord.gg/WEu6BdFEtp)
10-
- [bootc discussion forums](https://github.com/bootc-dev/bootc/discussions) - This is not an Universal Blue managed space, but is an excellent resource if you run into issues with building bootc images.
7+
- dms and dms-greeter packages, niri and alacritty terminal emulator installation
8+
- First-login bootstrap for ready-made user defaults
9+
- Configuration assets shipped in the image
10+
- dms-greeter login integration and defaults
1111

12-
# How to Use
12+
## Origin and inspiration
1313

14-
To get started on your first bootc image, simply read and follow the steps in the next few headings.
15-
If you prefer instructions in video form, TesterTech created an excellent tutorial, embedded below.
14+
This repository inherits the Universal Blue bootc image-template workflow and follows the spirit of the [Zirconium project](https://github.com/zirconium-dev) that brings native niri experience on Fedora system.
1615

17-
[![Video Tutorial](https://img.youtube.com/vi/IxBl11Zmq5w/0.jpg)](https://www.youtube.com/watch?v=IxBl11Zmq5wE)
16+
It builds on the work of:
1817

19-
## Step 0: Prerequisites
18+
- [Universal Blue](https://github.com/ublue-os)
19+
- [Avenge Media](https://github.com/AvengeMedia/DankMaterialShell)
2020

21-
These steps assume you have the following:
22-
- A Github Account
23-
- A machine running a bootc image (e.g. Bazzite, Bluefin, Aurora, or Fedora Atomic)
24-
- Experience installing and using CLI programs
21+
After tinkering with Dank Material Shell on different compositors and base operating systems (and some distros bundling different shells and compositors), and discovering Zirconium, a fedora-based bootc image using the Dank Material Shell with Niri; the author's previous learning curiosity for bootc and immutable images rebasing led to try the Universal Blue image template and build a custom image with it. The goal is to provide another polished, modern desktop experience bootable image, that brings Dank Material Shell and Niri together on an immutable Fedora, using as the base the quality of life improvements of Universal Blue. The image is designed for users who want a modern, opinionated desktop experience with DMS and Niri with the benefits from the upstream Universal Blue ecosystem.
2522

26-
## Step 1: Preparing the Template
23+
This image uses Niri, the preferred choice in Dank Linux; however, Hyprland is also a strong alternative that is worth considering. The base image is Bluefin, which provides GNOME as the default desktop environment, and the DX version of Bluefin could be also used as a base image for an even more feature-rich experience. The author didn't managed the featured DX toggle ujust, so using the toggle would rebase to original Bluefin, and the DX version of Bluefin. If you build your own image, you can use the DX version of Bluefin as a base image and it should work fine. You can also manage another terminal emulator, such as ghostty or kitty.
2724

28-
### Step 1a: Copying the Template
25+
## Usage
2926

30-
Select `Use this Template` on this page. You can set the name and description of your repository to whatever you would like, but all other settings should be left untouched.
31-
32-
Once you have finished copying the template, you need to enable the Github Actions workflows for your new repository.
33-
To enable the workflows, go to the `Actions` tab of the new repository and click the button to enable workflows.
34-
35-
### Step 1b: Cloning the New Repository
36-
37-
Here I will defer to the much superior GitHub documentation on the matter. You can use whichever method is easiest.
38-
[GitHub Documentation](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
39-
40-
Once you have the repository on your local drive, proceed to the next step.
41-
42-
## Step 2: Initial Setup
43-
44-
### Step 2a: Creating a Cosign Key
45-
46-
Container signing is important for end-user security and is enabled on all Universal Blue images. By default the image builds *will fail* if you don't.
47-
48-
First, install the [cosign CLI tool](https://edu.chainguard.dev/open-source/sigstore/cosign/how-to-install-cosign/#installing-cosign-with-the-cosign-binary)
49-
With the cosign tool installed, run inside your repo folder:
50-
51-
```bash
52-
COSIGN_PASSWORD="" cosign generate-key-pair
53-
```
54-
55-
The signing key will be used in GitHub Actions and will not work if it is password protected.
56-
57-
> [!WARNING]
58-
> Be careful to *never* accidentally commit `cosign.key` into your git repo. If this key goes out to the public, the security of your repository is compromised.
59-
60-
Next, you need to add the key to GitHub. This makes use of GitHub's secret signing system.
61-
62-
<details>
63-
<summary>Using the Github Web Interface (preferred)</summary>
64-
65-
Go to your repository settings, under `Secrets and Variables` -> `Actions`
66-
![image](https://user-images.githubusercontent.com/1264109/216735595-0ecf1b66-b9ee-439e-87d7-c8cc43c2110a.png)
67-
Add a new secret and name it `SIGNING_SECRET`, then paste the contents of `cosign.key` into the secret and save it. Make sure it's the .key file and not the .pub file. Once done, it should look like this:
68-
![image](https://user-images.githubusercontent.com/1264109/216735690-2d19271f-cee2-45ac-a039-23e6a4c16b34.png)
69-
</details>
70-
<details>
71-
<summary>Using the Github CLI</summary>
72-
73-
If you have the `github-cli` installed, run:
74-
75-
```bash
76-
gh secret set SIGNING_SECRET < cosign.key
77-
```
78-
</details>
79-
80-
### Step 2b: Choosing Your Base Image
81-
82-
To choose a base image, simply modify the line in the container file starting with `FROM`. This will be the image your image derives from, and is your starting point for modifications.
83-
For a base image, you can choose any of the Universal Blue images or start from a Fedora Atomic system. Below this paragraph is a dropdown with a non-exhaustive list of potential base images.
84-
85-
<details>
86-
<summary>Base Images</summary>
87-
88-
- Bazzite: `ghcr.io/ublue-os/bazzite:stable`
89-
- Aurora: `ghcr.io/ublue-os/aurora:stable`
90-
- Bluefin: `ghcr.io/ublue-os/bluefin:stable`
91-
- Universal Blue Base: `ghcr.io/ublue-os/base-main:latest`
92-
- Fedora: `quay.io/fedora/fedora-bootc:44`
93-
94-
You can find more Universal Blue images on the [packages page](https://github.com/orgs/ublue-os/packages).
95-
</details>
96-
97-
If you don't know which image to pick, choosing the one your system is currently on is the best bet for a smooth transition. To find out what image your system currently uses, run the following command:
98-
```bash
99-
sudo bootc status
100-
```
101-
This will show you all the info you need to know about your current image. The image you are currently on is displayed after `Booted image:`. Paste that information after the `FROM` statement in the Containerfile to set it as your base image.
102-
103-
### Step 2c: Changing Names
104-
105-
Change the `IMAGE_NAME` and `REPO_ORGANIZATION` variable inside the `image-template.env`
106-
107-
To commit and push all the files changed and added in step 2 into your Github repository:
108-
```bash
109-
git add Containerfile image-template.env cosign.pub
110-
git commit -m "Initial Setup"
111-
git push
112-
```
113-
Once pushed, go look at the Actions tab on your Github repository's page. The green checkmark should be showing on the top commit, which means your new image is ready!
114-
115-
## Step 3: Switch to Your Image
116-
117-
From your bootc system, run the following command substituting in your Github username and image name where noted.
118-
```bash
119-
sudo bootc switch ghcr.io/<username>/<image_name>
120-
```
121-
This should queue your image for the next reboot, which you can do immediately after the command finishes. You have officially set up your custom image! See the following section for an explanation of the important parts of the template for customization.
122-
123-
# Repository Contents
124-
125-
## Containerfile
126-
127-
The [Containerfile](./Containerfile) defines the operations used to customize the selected image.This file is the entrypoint for your image build, and works exactly like a regular podman Containerfile. For reference, please see the [Podman Documentation](https://docs.podman.io/en/latest/Introduction.html).
128-
129-
## build.sh
130-
131-
The [build.sh](./build_files/build.sh) file is called from your Containerfile. It is the best place to install new packages or make any other customization to your system. There are customization examples contained within it for your perusal.
132-
133-
## build.yml
134-
135-
The [build.yml](./.github/workflows/build.yml) Github Actions workflow creates your custom OCI image and publishes it to the Github Container Registry (GHCR). By default, the image name will match the Github repository name.
136-
137-
# Building Disk Images
138-
139-
This template provides an out of the box workflow for creating disk images (ISO, qcow, raw) for your custom OCI image which can be used to directly install onto your machines.
140-
141-
This template provides a way to upload the disk images that is generated from the workflow to a S3 bucket. The disk images will also be available as an artifact from the job, if you wish to use an alternate provider. To upload to S3 we use [rclone](https://rclone.org/) which is able to use [many S3 providers](https://rclone.org/s3/).
142-
143-
## Setting Up ISO Builds
144-
145-
The [build-disk.yml](./.github/workflows/build-disk.yml) Github Actions workflow creates a disk image from your OCI image by utilizing the [bootc-image-builder](https://osbuild.org/docs/bootc/). In order to use this workflow you must complete the following steps:
146-
147-
1. Modify `disk_config/iso.toml` to point to your custom container image before generating an ISO image.
148-
2. If you changed your image name from the default in `build.yml` then in the `build-disk.yml` file edit the `IMAGE_REGISTRY`, `IMAGE_NAME` and `DEFAULT_TAG` environment variables with the correct values. If you did not make changes, skip this step.
149-
3. Finally, if you want to upload your disk images to S3 then you will need to add your S3 configuration to the repository's Action secrets. This can be found by going to your repository settings, under `Secrets and Variables` -> `Actions`. You will need to add the following
150-
- `S3_PROVIDER` - Must match one of the values from the [supported list](https://rclone.org/s3/)
151-
- `S3_BUCKET_NAME` - Your unique bucket name
152-
- `S3_ACCESS_KEY_ID` - It is recommended that you make a separate key just for this workflow
153-
- `S3_SECRET_ACCESS_KEY` - See above.
154-
- `S3_REGION` - The region your bucket lives in. If you do not know then set this value to `auto`.
155-
- `S3_ENDPOINT` - This value will be specific to the bucket as well.
156-
157-
Once the workflow is done, you'll find the disk images either in your S3 bucket or as part of the summary under `Artifacts` after the workflow is completed.
158-
159-
# Artifacthub
160-
161-
This template comes with the necessary tooling to index your image on [artifacthub.io](https://artifacthub.io). Use the `artifacthub-repo.yml` file at the root to verify yourself as the publisher. This is important to you for a few reasons:
162-
163-
- The value of artifacthub is it's one place for people to index their custom images, and since we depend on each other to learn, it helps grow the community.
164-
- You get to see your pet project listed with the other cool projects in Cloud Native.
165-
- Since the site puts your README front and center, it's a good way to learn how to write a good README, learn some marketing, finding your audience, etc.
166-
167-
[Discussion Thread](https://universal-blue.discourse.group/t/listing-your-custom-image-on-artifacthub/6446)
168-
169-
# Justfile Documentation
170-
171-
The `Justfile` contains various commands and configurations for building and managing container images and virtual machine images using Podman and other utilities.
172-
To use it, you must have installed [just](https://just.systems/man/en/introduction.html) from your package manager or manually. It is available by default on all Universal Blue images.
173-
174-
## Environment Variables
175-
176-
These are all sourced from the `image-template.env` file.
177-
178-
- `image_name`: The name of the image (default: "image-template").
179-
- `default_tag`: The default tag for the image (default: "latest").
180-
- `bib_image`: The Bootc Image Builder (BIB) image (default: "quay.io/centos-bootc/bootc-image-builder:latest").
181-
182-
## Building The Image
183-
184-
All these recipes will work (with default values) without supplying any arguments to them, e.g. `just build`
185-
186-
### `just build`
187-
188-
Builds a container image using Podman.
27+
If you want to test it on a local bootc system, you can switch to the image with:
18928

19029
```bash
191-
just build $target_image $tag
30+
sudo bootc switch ghcr.io/paufortiana/dms-bluefin:latest
19231
```
19332

194-
Arguments:
195-
- `$target_image`: The tag you want to apply to the image (default: `$image_name`).
196-
- `$tag`: The tag for the image (default: `$default_tag`).
197-
198-
### Rechunking
199-
We can flatten the layers of container images to make sure there isn't a single huge layer when your image gets published.
200-
This does not make your image faster to download, just provides better resumability.
201-
202-
#### `just ostree-rechunk`
203-
Rechunks the existing Image with [rpm-ostree](https://coreos.github.io/rpm-ostree/build-chunked-oci/)
204-
205-
```bash
206-
just ostree-rechunk $target_image $tag
207-
```
208-
209-
#### `just rechunk`
210-
Rechunks the existing Image with [chunkah](https://github.com/coreos/chunkah), this is probably gonna be the default here at some point, try it out, it's cool.
211-
212-
```bash
213-
just rechunk $target_image $tag
214-
```
215-
216-
### Switching to the locally built image for testing
217-
218-
The image has to be in the containers-storage owned by root, to be able to rebase to it, see the `_rootful_load_image` recipe.
219-
220-
`sudo just build` and `sudo just ostree-rechunk` builds directly as root and allows you to skip the transfer to the root containers-storage.
221-
222-
You can rebase to all the images that are in your containers-storage:
223-
224-
```
225-
sudo podman image list --filter=label=containers.bootc=1
226-
```
227-
228-
See [man bootc switch](https://bootc.dev/bootc/man/bootc-switch.8.html) for more info.
229-
230-
```
231-
sudo bootc switch --transport containers-storage localhost/myimage:latest
232-
```
233-
234-
and reboot your system!
235-
236-
## Building and Running Virtual Machines and ISOs
237-
238-
The below commands all build QCOW2 images. To produce or use a different type of image, substitute in the command with that type in the place of `qcow2`. The available types are `qcow2`, `iso`, and `raw`.
239-
240-
### `just build-qcow2`
241-
242-
Builds a QCOW2 virtual machine image.
243-
244-
```bash
245-
just build-qcow2 $target_image $tag
246-
```
247-
248-
### `just rebuild-qcow2`
249-
250-
Rebuilds a QCOW2 virtual machine image.
251-
252-
```bash
253-
just rebuild-vm $target_image $tag
254-
```
255-
256-
### `just run-vm-qcow2`
257-
258-
Runs a virtual machine from a QCOW2 image.
259-
260-
```bash
261-
just run-vm-qcow2 $target_image $tag
262-
```
263-
264-
### `just spawn-vm`
265-
266-
Runs a virtual machine using systemd-vmspawn.
267-
268-
```bash
269-
just spawn-vm rebuild="0" type="qcow2" ram="6G"
270-
```
271-
272-
## File Management
273-
274-
### `just check`
275-
276-
Checks the syntax of all `.just` files and the `Justfile`.
277-
278-
### `just fix`
279-
280-
Fixes the syntax of all `.just` files and the `Justfile`.
281-
282-
### `just clean`
283-
284-
Cleans the repository by removing build artifacts.
33+
The image will be built on weekly basis and published to GitHub Container Registry. The `ujust update` command will do the same as on your current uBlue system, with the new image, so you can use it to update your system to the latest version of the image (and the base image), including flatpaks and homebrew.
28534

286-
### `just lint`
35+
### Recommended workflow
28736

288-
Runs shell check on all Bash scripts.
37+
1. Install a base Bluefin image first.
38+
2. Switch to the DMS-Bluefin image (you will need to select `niri` on the login screen after rebooting).
39+
3. Enjoy the DMS/Niri experience with all the features of Bluefin and Dank Material Shell.
28940

290-
### `just format`
41+
## Local build
29142

292-
Runs shfmt on all Bash scripts.
43+
If you prefer to not use the pre-built image in this repository, you can build the image locally. Clone the repo, and run `just` to see the available commands.
29344

294-
## Additional resources
45+
Follow instructions in the [ublue-os/image-template repository README](https://github.com/ublue-os/image-template) for more information about building your image locally.
29546

296-
For additional driver support, ublue maintains a set of scripts and container images available at [ublue-akmod](https://github.com/ublue-os/akmods). These images include the necessary scripts to install multiple kernel drivers within the container (Nvidia, OpenRazer, Framework...). The documentation provides guidance on how to properly integrate these drivers into your container image.
47+
## Repository structure
29748

298-
## Community Examples
49+
- [Containerfile](Containerfile) — build entrypoint for the image
50+
- [build_files/build.sh](build_files/build.sh) — installs packages and applies image customizations
51+
- [system_files](system_files) — configuration and service files shipped into the image
52+
- [image-template.env](image-template.env) — image metadata and publishing defaults
53+
- [Justfile](Justfile) — build and test commands for the image
29954

300-
These are images derived from this template (or similar enough to this template). Reference them when building your image!
55+
## Thanks
30156

302-
- [m2Giles' OS](https://github.com/m2giles/m2os)
303-
- [bOS](https://github.com/bsherman/bos)
304-
- [Homer](https://github.com/bketelsen/homer/)
305-
- [Amy OS](https://github.com/astrovm/amyos)
306-
- [VeneOS](https://github.com/Venefilyn/veneos)
57+
A big thank-you to the people behind [uBlue](https://universal-blue.org/) and [DankLinux](https://danklinux.com) for the projects, ideas, and tools that made my new favorite operating system possible. It is deeply thankful to the uBlue project for providing the excellent template and workflow foundation, and to the Dank Linux project for providing excellent documentation and resources for manual installation and configuration.

0 commit comments

Comments
 (0)