feat(theme): a themed boot splash, and amdgpu back in the ThinkPad's initrd

This commit is contained in:
nevaforget committed 2026-09-28 08:23:48 +02:00
1 parent 3d5ac11aa2
commit e7f76aaf03
4 files changed
+71 -8

No files matched your search

+42
View File
@@ -1,5 +1,47 @@
# Decisions
## 2026-09-25 – amdgpu back in the ThinkPad's initrd, for Plymouth's sake
- **Who**: Dominik, ClaudeCode
- **Why**: With the splash enabled, Plymouth came up on eDP-1 in the mode the
firmware had left behind, stretched over a panel with four times the pixels.
The boot log has both halves: `simpledrm` owns the framebuffer while the
initrd runs, and amdgpu only takes eDP-1 twenty-five seconds later, on the way
into the real root. Plymouth draws in the initrd, so it never saw the panel's
own resolution. The cause was `hardware.amdgpu.initrd.enable = false`, set on
this host to keep the LUKS passphrase prompt in the firmware's large text mode
rather than at 3840x2400, where the 8x16 console font is a fifth as tall.
- **Tradeoffs**: The two wants are opposed — the console text is readable in the
firmware mode, Plymouth is only sharp in the native one. Plymouth draws the
passphrase prompt itself and scales with the panel, so as long as it runs the
text mode buys nothing; with `plymouth.enable=0` on the kernel line, or a
Plymouth that fails, the tiny prompt is back. That case is rare and reachable,
the splash is every boot.
- **How**: The line is gone rather than set to `true`: nixos-hardware's amd
profile already sets `lib.mkDefault true`, and a build without it comes out at
the same store path. A comment in its place records what dropping it costs, so
the reasoning is not lost with the line.
## 2026-09-25 – A boot splash, themed from nixpkgs rather than a new flake input
- **Who**: Dominik, ClaudeCode
- **Why**: The boot was the one part of the system still showing stock text,
the LUKS passphrase prompt among it. With systemd in the initrd, Plymouth
draws that prompt itself, so the splash covers the whole way from firmware to
the greeter rather than stopping at the disk.
- **Tradeoffs**: (1) **catppuccin/nix** offers `catppuccin.plymouth.enable`,
but this flake does not have that input, and taking it on for a boot splash
means carrying a second theming source next to the packages already used
here. (2) **nixpkgs' `catppuccin-plymouth`** is the same upstream theme as a
plain package, with a `variant` argument and no new input. Chosen. (3) The
cost either way is that boot messages are hidden, so a stalled boot shows a
still image first; `plymouth.enable=0` on the kernel line takes it back
without rebuilding, and the previous generation is in the boot menu.
- **How**: `boot.plymouth` in `modules/theme.nix`, beside the other theme
packages, on flavour Mocha like them. `quiet` was already on the kernel
command line and the module adds `splash` on its own, so the kernel
parameters needed no change.
## 2026-09-25 – One portal config, and the file dialog on the GTK backend
- **Who**: Dominik, ClaudeCode
+1 -1
View File
@@ -26,7 +26,7 @@ modules/
user.nix moonarch.user option, set per host
disk.nix partitioning: GPT, optional LUKS2, btrfs subvolumes
desktop.nix compositor, /etc deployment, portals, the rest of the packages
theme.nix GTK, Qt, Kvantum, cursors, fonts
theme.nix GTK, Qt, Kvantum, Plymouth, cursors, fonts
browsers.nix Firefox with its preconfiguration, Chromium, handler
shell.nix zsh and the command line tools
lock.nix gtklock and its PAM stack
+10 -6
View File
@@ -22,12 +22,16 @@
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.kernelParams = [ "quiet" ];
# nixos-hardware puts amdgpu into the initrd, so the panel is already at its
# native 3840x2400 when LUKS asks for the passphrase and the 8x16 console font
# is a fifth of the height it has on the firmware framebuffer. Without the
# driver the prompt is drawn in the mode the firmware left behind and the
# driver loads a moment later, on the way into the real root.
hardware.amdgpu.initrd.enable = false;
# No hardware.amdgpu.initrd.enable here: nixos-hardware's amd profile already
# sets it, so the panel is at its native 3840x2400 by the time LUKS asks for
# the passphrase. Plymouth draws in the initrd and needs that — without the
# driver it gets the mode the firmware left behind, scaled over a panel with
# four times the pixels.
#
# Setting it to false, as this host did before, buys back the console text
# underneath: at 3840x2400 the 8x16 font is a fifth of the height it has on
# the firmware framebuffer, so a passphrase prompt that arrives as text —
# with Plymouth off, or failed — is barely readable.
networking.hostName = "thinkpad";
networking.networkmanager.enable = true;
+18 -1
View File
@@ -1,4 +1,4 @@
# ABOUTME: GTK, Qt, Kvantum, cursors and fonts — the look, in one place.
# ABOUTME: GTK, Qt, Kvantum, Plymouth, cursors and fonts — the look, in one place.
# ABOUTME: Same theme derivations the greeter uses, so the two cannot drift apart.
{ pkgs, moonarchSrc, moonarchPkgs, moonarchThemes, ... }:
@@ -40,6 +40,12 @@ let
accent = "lavender";
variant = "mocha";
};
# Mocha like everything else here. The package installs under
# share/plymouth/themes/catppuccin-${variant}, which is the name boot.plymouth
# asks for. Upstream Catppuccin has no accent variants for Plymouth.
plymouthVariant = "mocha";
plymouthTheme = pkgs.catppuccin-plymouth.override { variant = plymouthVariant; };
in
{
environment.etc = {
@@ -90,6 +96,17 @@ in
}];
};
# The boot splash. `quiet` is already on the kernel command line and the module
# puts `splash` there itself, so nothing else has to change for it to show.
# With systemd in the initrd, which this configuration uses, systemd asks for
# the LUKS passphrase and Plymouth draws that prompt; the script initrd instead
# shows it as text before the splash comes up.
boot.plymouth = {
enable = true;
theme = "catppuccin-${plymouthVariant}";
themePackages = [ plymouthTheme ];
};
# Qt applications are wrapped, so each one looks for plugins in its own
# closure and never finds a style installed alongside it — which is why VLC
# kept coming up in the stock Qt style. Enabling this puts the profile's Qt5