Some checks failed
Check / eval (push) Has been cancelled
Ghostty's OpenGL 4.3 floor broke the Acer (HD 4000 / 4.2). Dual-terminal support (default Ghostty + install-time Kitty fallback) was more complexity than it was worth. - Remove ghostty.nix / nomarchy.ghostty.enable - Kitty always installed and themed from theme-state - Default nomarchy.terminal = kitty; SUPER+Return, doctor, calendar, what-changed use kitty --class=com.nomarchy.* - Drop install-time glxinfo probe and mesa-demos on the installer - Docs/REQUIREMENTS no longer list OpenGL 4.3 as a terminal floor Verified: V0 flake check; option-docs; installer-safety; template HM has kitty, no ghostty; menu/calendar emit classed kitty launches.
86 lines
3.4 KiB
Nix
86 lines
3.4 KiB
Nix
{ lib
|
|
, stdenvNoCC
|
|
, makeWrapper
|
|
, bash
|
|
, gum
|
|
, disko
|
|
, whois # mkpasswd
|
|
, git
|
|
, python3
|
|
, util-linux # lsblk, wipefs, swapoff, lscpu
|
|
, gptfdisk # sgdisk
|
|
, parted # partprobe
|
|
, cryptsetup
|
|
, lvm2 # dmsetup
|
|
, pciutils # lspci
|
|
, usbutils # lsusb (fingerprint-reader VID probe; sysfs is the fallback)
|
|
, btrfs-progs # inspect-internal map-swapfile (hibernation offset)
|
|
, xkeyboard_config # human-readable installed layout/variant catalog
|
|
# Baked metadata — what this installer installs and where it came from.
|
|
, templateDir # templates/downstream (home.nix, theme-state.json)
|
|
, nomarchyLock # the distro's flake.lock (for offline lock composition)
|
|
, hardwareModuleNames # newline-separated nixos-hardware module names
|
|
, nixpkgsPath # pinned nixpkgs source (NIX_PATH for disko's eval)
|
|
, flakeUrl # flake-style URL written into the generated flake.nix
|
|
, lockedNode # attrset: the flake.lock "locked" node for nomarchy
|
|
# (path-type: resolves from the ISO store, offline)
|
|
, originalNode # attrset: the flake.lock "original" node (the forge,
|
|
# so `nix flake update` later re-resolves normally)
|
|
, rev ? null # informational: rev the ISO was built from
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
pname = "nomarchy-install";
|
|
version = "0.1.0";
|
|
|
|
src = ./.;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 nomarchy-install.sh $out/bin/nomarchy-install
|
|
patchShebangs $out/bin/nomarchy-install
|
|
|
|
share=$out/share/nomarchy-install
|
|
install -Dm644 disko-config.nix "$share/disko-config.nix"
|
|
install -Dm644 hardware-db.sh "$share/hardware-db.sh"
|
|
install -Dm644 compose-lock.py "$share/compose-lock.py"
|
|
install -Dm644 ${nomarchyLock} "$share/flake.lock"
|
|
install -Dm644 ${hardwareModuleNames} "$share/hardware-modules.txt"
|
|
# Empty flake registry: no network lookups for indirect refs.
|
|
echo '{"flakes":[],"version":2}' > "$share/registry.json"
|
|
mkdir -p "$share/template"
|
|
# Full downstream template is the SoT; install script copies + patches.
|
|
cp ${templateDir}/flake.nix ${templateDir}/system.nix \
|
|
${templateDir}/home.nix ${templateDir}/theme-state.json \
|
|
"$share/template/"
|
|
install -Dm644 patch-template.py "$share/patch-template.py"
|
|
|
|
# nixos-install / nixos-generate-config / nixos-enter / nix / systemd
|
|
# tools come from the live system on purpose — they must match it.
|
|
wrapProgram $out/bin/nomarchy-install \
|
|
--prefix PATH : ${lib.makeBinPath [
|
|
bash gum disko whois git python3
|
|
util-linux gptfdisk parted cryptsetup lvm2 pciutils usbutils btrfs-progs
|
|
]} \
|
|
--set NOMARCHY_INSTALL_SHARE "$share" \
|
|
--set NOMARCHY_XKB_RULES ${xkeyboard_config}/share/X11/xkb/rules/base.lst \
|
|
--set NOMARCHY_NIXPKGS ${nixpkgsPath} \
|
|
--set NOMARCHY_FLAKE_URL ${lib.escapeShellArg flakeUrl} \
|
|
--set NOMARCHY_REV ${lib.escapeShellArg (toString rev)} \
|
|
--set NOMARCHY_LOCKED_JSON ${lib.escapeShellArg (builtins.toJSON lockedNode)} \
|
|
--set NOMARCHY_ORIGINAL_JSON ${lib.escapeShellArg (builtins.toJSON originalNode)}
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Nomarchy guided installer (disko + mkFlake + nixos-install)";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "nomarchy-install";
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|