From cde279af0b5765bf8aacf63ae27fb3f556c30d1b Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Sat, 13 Jun 2026 21:46:40 +0100 Subject: [PATCH] feat(branding): ISO boot splash from the vendored Nomarchy logo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vendor the vector logo from the legacy branch (modules/nixos/branding/logo.svg) and use it for the live ISO's isolinux splash: rsvg-convert renders it, recolored to the palette accent and centred on the theme base (from theme-state.json) at build time, wired via isoImage.splashImage in hosts/live.nix. Verified the generated PNG by building it in the sandbox. UEFI/GRUB still uses the stock theme (grubTheme needs a full theme dir — left on the roadmap), as does the distroId switch. Co-Authored-By: Claude Opus 4.8 --- .claude/settings.local.json | 5 ++- README.md | 7 ++-- hosts/live.nix | 16 +++++++++ modules/nixos/branding/logo.svg | 64 +++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 modules/nixos/branding/logo.svg diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 62be6e2..f846cf9 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -273,7 +273,10 @@ "Bash(nix-instantiate --parse modules/nixos/plymouth.nix)", "Bash(echo \"parse OK\")", "Bash(echo \"=== build the plymouth theme derivation directly ===\")", - "Bash(nix-instantiate --parse modules/nixos/default.nix)" + "Bash(nix-instantiate --parse modules/nixos/default.nix)", + "Bash(cp /nix/store/f18ij42lmpg07fn1m29aplayakx7kqpz-splash-test.png/* preview-splash-built.png)", + "Bash(cp /nix/store/f18ij42lmpg07fn1m29aplayakx7kqpz-splash-test.png preview-splash-built.png)", + "Bash(nix-instantiate --parse hosts/live.nix)" ] } } diff --git a/README.md b/README.md index 56e9c68..96eaf83 100644 --- a/README.md +++ b/README.md @@ -318,8 +318,11 @@ close · `SUPER+1..9` workspaces · `Print` region screenshot. (os-release `PRETTY_NAME`, systemd-boot entries, ISO menu label). ✓ tuigreet greeting (`Welcome to `) and a branded `users.motd` (doubling as a helper cheat sheet), both keyed off `distroName`. - Remaining: `isoImage.splashImage`/`grubTheme` art for the ISO boot - screen (needs a designed asset), and the `distroId` question (it changes + ✓ `isoImage.splashImage` — the vendored vector logo + (`modules/nixos/branding/logo.svg`, from legacy) recolored to the palette + accent on the theme base, built at ISO-build time (`hosts/live.nix`). + Remaining: `isoImage.grubTheme` so UEFI boot matches the isolinux splash + (needs a full grub theme dir), and the `distroId` question (it changes `DEFAULT_HOSTNAME` and upstream `isNixos` checks — needs a test pass; nixos-* CLI names stay regardless) - **Theme-switch feedback:** ✓ the "rebuilding…" notification is now diff --git a/hosts/live.nix b/hosts/live.nix index ac769a0..a8e9b2f 100644 --- a/hosts/live.nix +++ b/hosts/live.nix @@ -3,11 +3,27 @@ # exists to test the distro end-to-end on real hardware. { lib, pkgs, username, nomarchySrc, ... }: +let + # ISO boot splash: the Nomarchy monogram recolored to the palette accent, + # centred on the theme base. Built from the vendored vector logo and the + # live theme-state.json (tokyo-night by default). Shows on the isolinux + # (BIOS) boot menu; UEFI/GRUB still uses the stock theme (see roadmap). + state = builtins.fromJSON (builtins.readFile ../theme-state.json); + isoColor = key: fallback: lib.removePrefix "#" ((state.colors or { }).${key} or fallback); + isoSplash = pkgs.runCommand "nomarchy-iso-splash.png" + { nativeBuildInputs = [ pkgs.imagemagick pkgs.librsvg ]; } '' + rsvg-convert -h 320 ${../modules/nixos/branding/logo.svg} > logo.png + magick logo.png -fill "#${isoColor "accent" "7aa2f7"}" -colorize 100 logo-c.png + magick -size 1920x1080 xc:"#${isoColor "base" "1a1b26"}" \ + logo-c.png -gravity center -composite $out + ''; +in { networking.hostName = "nomarchy-live"; isoImage.volumeID = lib.mkForce "NOMARCHY_LIVE"; isoImage.edition = lib.mkForce "live"; + isoImage.splashImage = isoSplash; # The minimal-CD profile slims the image for a CONSOLE installer; this # ISO is the desktop, so re-enable what it strips. Above all diff --git a/modules/nixos/branding/logo.svg b/modules/nixos/branding/logo.svg new file mode 100644 index 0000000..b060ba0 --- /dev/null +++ b/modules/nixos/branding/logo.svg @@ -0,0 +1,64 @@ + + + +