feat(system): Plymouth splash, distroName, allowUnfree, offline-pin hardening

- Plymouth boot splash ported from the legacy branch (modules/nixos/
  plymouth/): logo + eased progress + LUKS entry, background tinted from
  theme-state.json via the new nomarchy.system.stateFile (wired by
  mkFlake/lib.nix; null → Tokyo Night fallback). Default on; OFF on the
  live ISO (boot-message visibility on the install medium). Pulls
  boot.initrd.systemd, which also drives the keyboard-at-LUKS feature.
- system.nixos.distroName = "Nomarchy" (os-release PRETTY_NAME,
  systemd-boot entries, ISO menu label). distroId left "nixos" (feeds
  DEFAULT_HOSTNAME + upstream isNixos checks — roadmapped).
- nixpkgs.config.allowUnfree distro-wide (here + both import-nixpkgs
  sites) — unblocks claude-code for the menu's ask-Claude module.
- systemd-boot.configurationLimit = 10 so entries don't fill the ESP.
- Live ISO: nomarchy.idle.enable = false — hypridle was suspending the
  VM mid-install (the install-hung regression); installed systems keep it.
- flake.nix offline pins (verified 0-leak via a foreign-identity
  gap-analysis probe): the repo's own standalone HM gen + inputDerivations,
  mustache-go + stdenv (stylix re-renders base16 per switch), microcode-amd/
  intel (enableRedistributableFirmware activated updateMicrocode →
  source-build cascade), buildEnv's builder.pl, findXMLCatalogs, and the
  representativeInstall mirror (xkb/initrd-systemd/microcode).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-06-13 07:37:32 +01:00
parent 1ba1eeed64
commit eda8461304
19 changed files with 906 additions and 1 deletions

82
modules/home/fuzzel.nix Normal file
View File

@@ -0,0 +1,82 @@
# Fuzzel — launcher, dmenu renderer for the menu system, themed from
# theme-state.json like every other surface. Also home of nomarchy-menu,
# the dispatcher script the menu roadmap grows out of (first module:
# power).
{ config, lib, pkgs, ... }:
let
cfg = config.nomarchy;
t = cfg.theme;
c = t.colors;
# fuzzel.ini colors are rrggbbaa, no leading #.
hexa = color: alpha: "${lib.removePrefix "#" color}${alpha}";
nomarchy-menu = pkgs.writeShellScriptBin "nomarchy-menu" ''
# Nomarchy menu dispatcher thin presentation layer over
# `fuzzel --dmenu`; actions delegate to systemctl/hyprctl/
# nomarchy-theme-sync. The icons are nf-md glyphs (any shipped
# Nerd Font carries them).
case "''${1:-}" in
power)
choice=$(printf '%s\n' \
"󰍃 Logout" \
"󰤄 Suspend" \
"󰒲 Hibernate" \
"󰜉 Reboot" \
"󰐥 Shutdown" \
| fuzzel --dmenu --prompt "power " --lines 5 --width 24) || exit 0
case "$choice" in
*Logout) hyprctl dispatch exit ;;
*Suspend) systemctl suspend ;;
*Hibernate) systemctl hibernate ;;
*Reboot) systemctl reboot ;;
*Shutdown) systemctl poweroff ;;
esac ;;
*)
echo "usage: nomarchy-menu power" >&2
exit 64 ;;
esac
'';
in
{
config = lib.mkIf cfg.fuzzel.enable {
home.packages = [ nomarchy-menu ];
programs.fuzzel = {
enable = true;
settings = {
main = {
# UI font first; the mono Nerd Font follows so menu icons
# (nf-md glyphs) resolve — fcft falls back per glyph.
font = "${t.fonts.ui}:size=${toString (t.fonts.size + 1)}, ${t.fonts.mono}:size=${toString (t.fonts.size + 1)}";
terminal = cfg.terminal;
layer = "overlay";
lines = 12;
width = 40;
horizontal-pad = 24;
vertical-pad = 16;
inner-pad = 8;
};
colors = {
background = hexa c.base "f2";
text = hexa c.text "ff";
prompt = hexa c.subtext "ff";
placeholder = hexa c.muted "ff";
input = hexa c.text "ff";
match = hexa c.accent "ff";
selection = hexa c.surface "ff";
selection-text = hexa c.text "ff";
selection-match = hexa c.accent "ff";
border = hexa c.accent "ee";
};
border = {
width = t.ui.borderSize;
radius = t.ui.rounding;
};
};
};
};
}

72
modules/home/idle.nix Normal file
View File

@@ -0,0 +1,72 @@
# hyprlock + hypridle — screen locking and idle management, themed from
# theme-state.json. One concern, one file: hypridle drives WHEN (idle
# lock, display off, suspend, lock-before-sleep), hyprlock is the
# themed lock screen itself (also behind the power menu's Lock entry).
{ config, lib, ... }:
let
cfg = config.nomarchy;
t = cfg.theme;
c = t.colors;
inherit (config.nomarchy.lib) rgb;
in
{
config = lib.mkIf cfg.idle.enable {
programs.hyprlock = {
enable = true;
settings = {
general.hide_cursor = true;
background = [{
monitor = "";
color = rgb c.base;
}];
input-field = [{
monitor = "";
size = "300, 50";
outline_thickness = t.ui.borderSize;
dots_size = 0.25;
outer_color = rgb c.accent;
inner_color = rgb c.surface;
font_color = rgb c.text;
check_color = rgb c.warn;
fail_color = rgb c.bad;
rounding = t.ui.rounding;
placeholder_text = "<i>password</i>";
}];
label = [{
monitor = "";
text = "$TIME";
color = rgb c.text;
font_size = 64;
font_family = t.fonts.ui;
position = "0, 120";
halign = "center";
valign = "center";
}];
};
};
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{ timeout = 300; on-timeout = "loginctl lock-session"; }
{
timeout = 600;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{ timeout = 1800; on-timeout = "systemctl suspend"; }
];
};
};
};
}

92
modules/home/swaync.nix Normal file
View File

@@ -0,0 +1,92 @@
# swaync — notification daemon + control centre, themed from
# theme-state.json. Until this shipped, nothing rendered notify-send at
# all: the theme-switch progress toasts, the CLI's font warnings and the
# live ISO's welcome message were all invisible.
{ config, lib, ... }:
let
cfg = config.nomarchy;
t = cfg.theme;
c = t.colors;
r = toString t.ui.rounding;
in
{
config = lib.mkIf cfg.swaync.enable {
services.swaync = {
enable = true;
settings = {
positionX = "right";
positionY = "top";
control-center-margin-top = t.ui.gapsOut;
control-center-margin-right = t.ui.gapsOut;
control-center-width = 420;
notification-window-width = 400;
notification-icon-size = 48;
timeout = 6;
timeout-low = 3;
timeout-critical = 0; # critical stays until dismissed
};
style = ''
/* Palette baked from theme-state.json */
@define-color base ${c.base};
@define-color surface ${c.surface};
@define-color text ${c.text};
@define-color subtext ${c.subtext};
@define-color accent ${c.accent};
@define-color bad ${c.bad};
.notification {
background: alpha(@base, 0.95);
border: ${toString t.ui.borderSize}px solid alpha(@accent, 0.4);
border-radius: ${r}px;
color: @text;
}
.notification-content .summary {
color: @text;
font-weight: bold;
}
.notification-content .body {
color: @subtext;
}
.notification.critical {
border-color: @bad;
}
.control-center {
background: alpha(@base, 0.95);
border: ${toString t.ui.borderSize}px solid alpha(@accent, 0.4);
border-radius: ${r}px;
color: @text;
}
.control-center .notification-row:focus,
.control-center .notification-row:hover {
background: alpha(@surface, 0.6);
border-radius: ${r}px;
}
.widget-title {
color: @text;
font-weight: bold;
}
.widget-title > button {
background: @surface;
color: @text;
border: none;
border-radius: ${r}px;
}
.widget-title > button:hover {
background: @accent;
color: @base;
}
'';
};
};
}