Skip to content

Commit

Permalink
doc: Add NixOS and preview instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
max-ishere committed Dec 3, 2024
1 parent 17ac9a6 commit 4c1e6c0
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 4 deletions.
19 changes: 17 additions & 2 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,29 @@

> [!CAUTION]
> Before installation on hardware it is recomended to practice in a VM and having a rescue USB stick ready with your
> Linux distribution. Theme installation is a safe process if done right, but you better be safe than sorry.
> Linux distribution. Theme installation is a safe process if done right, but better be safe than sorry.
> [!TIP]
> If you want to see how the theme looks before you install it, there are some methods to do so in
> [showcase](SHOWCASE.md).
<!-- TODO: Link to the showcase header -->
## Generic instructions
## NixOS (Flakes)

1. Add this repo as a flake input.
2. Set [`boot.loader.grub.theme`](https://search.nixos.org/options?channel=24.11&show=boot.loader.grub.theme&from=0&size=50&sort=relevance&type=packages&query=boot.loader.grub+theme)

```nix
{ inputs, ... }: {
boot.loader.grub.theme = let
colorsheme = "night";
layout = "teleport";
resolution = "1920x1080";
in inputs.grubshin-bootpact.${colorsheme}.${layout}.${resolution};
}
```

## Other Linux distributions

1. Download a [release from GitHub](https://github.com/max-ishere/grubshin-bootpact/releases/latest).
2. If you have not installed themes before, you might have to [enable themes in GRUB](#enable-themes)
Expand Down
28 changes: 26 additions & 2 deletions SHOWCASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,31 @@
> [!NOTE]
> Scroll down for screenshots.
## Previewing the themes

### NixOS

If you're on Nix you just have to run one command:

```sh
nix build "github:max-ishere/grubshin-bootpact#$colors.$layout.$resolution.preview-theme"

# Example
nix build "github:max-ishere/grubshin-bootpact#night.teleport.1920x1080.preview-theme"
```

Where colors, layout and resolution can be obtained from the tables below.

This will create a result directory with an ISO file and a script to boot it in a QEMU VM. You can flash the ISO on a
USB as well, but you cannot use it to boot your OS because the only entries it has are showcasing the icons with a
reboot command.

### Other linux distributions

`hartwork` made an awesome tool <https://github.com/hartwork/grub2-theme-preview>. This lets you generate a preview ISO
as well and run it in QEMU. In fact, the NixOS approach replicates the majority of the functionality of this tool, the
only difference is that it is implemented in Nix and not python.

## Supported resolutions

| `nix build` | Common name |
Expand All @@ -27,7 +52,6 @@

## Screenshots


### Teleport (Night)

<img src="screenshots/teleport-night-720.png" />
Expand All @@ -50,4 +74,4 @@

### Classic (Abyss)

<img src="screenshots/classic-abyss-720.png" />
<img src="screenshots/classic-abyss-720.png" />

0 comments on commit 4c1e6c0

Please sign in to comment.