feat(branding): GRUB (UEFI) theme + distroId=nomarchy

Completes the remaining "Distro branding, round 2" work.

GRUB theme: hosts/live.nix builds nomarchyGrubTheme whose background is
the same composed splash as the isolinux/BIOS splash (accent logo on
base), with a palette-coloured boot menu and accent timeout bar. Derived
from nixos-grub2-theme only to reuse its bundled DejaVu .pf2; the stock
NixOS logo is dropped (ours is in the background). Wired as
isoImage.grubTheme so UEFI boot matches BIOS.

distroId: set system.nixos.distroId = "nomarchy" so os-release is honest
(ID=nomarchy, ID_LIKE=nixos). Safe — switch-to-configuration builds its
"is this NixOS?" guard from the configured distroId (and /etc/NIXOS is
the fallback), so rebuilds keep working. isNixos→false blanks the
nixos.org URLs, so extraOSReleaseArgs restores them to the project.

Adds checks.distro-id (runNixOSTest): boots distroId=nomarchy and runs
switch-to-configuration dry-activate green; os-release eval-verified from
the real downstream config; grub theme built + structure-verified.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-06-30 22:02:27 +01:00
parent 7d6d74fd7f
commit aac678335c
4 changed files with 139 additions and 14 deletions

View File

@@ -25,11 +25,25 @@ in
imports = [ ./options.nix ./plymouth.nix ./file-manager.nix ./power.nix ./services.nix ./hardware.nix ./timezone.nix ];
config = {
# The safe half of distro branding: distroName flows into
# /etc/os-release PRETTY_NAME, systemd-boot entry titles and the
# ISO boot-menu label. distroId stays "nixos" on purpose — it feeds
# DEFAULT_HOSTNAME and upstream isNixos checks (see roadmap).
# Distro branding. distroName flows into /etc/os-release PRETTY_NAME,
# systemd-boot entry titles and the ISO boot-menu label; distroId is the
# machine-readable ID (DEFAULT_HOSTNAME, lsb DISTRIB_ID, CPE name).
# distroId = "nomarchy" makes os-release honest — ID=nomarchy with
# ID_LIKE=nixos, the standard derivative-distro lineage marker (cf.
# Ubuntu→debian) — and is safe: switch-to-configuration builds its
# "is this NixOS?" guard from the *configured* distroId (and /etc/NIXOS
# still exists as the fallback), so rebuilds keep working; the nixos-*
# CLI tools are package names, untouched. The one side effect is that
# isNixos goes false and blanks the upstream nixos.org URLs, so we
# restore them pointing at the project instead.
system.nixos.distroName = lib.mkDefault "Nomarchy";
system.nixos.distroId = lib.mkDefault "nomarchy";
system.nixos.extraOSReleaseArgs = lib.mkDefault {
HOME_URL = "https://git.bemagri.xyz/bernardo/Nomarchy";
DOCUMENTATION_URL = "https://git.bemagri.xyz/bernardo/Nomarchy";
SUPPORT_URL = "https://git.bemagri.xyz/bernardo/Nomarchy";
BUG_REPORT_URL = "https://git.bemagri.xyz/bernardo/Nomarchy/issues";
};
# MOTD on TTY/SSH login (the desktop auto-logs into Hyprland, so this
# is mostly seen over SSH or on a bare console). Branded, and doubles