Compare commits

..

398 Commits

Author SHA1 Message Date
Bernardo Magri
82659566ac chore: untrack config.rasi (scratch reference committed by mistake)
config.rasi was the rofi theme dropped in to show the desired style; it's
not part of the distro. Remove it from tracking (the file stays on disk,
untracked). Its content informed 994025f and remains in that history.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 22:12:02 +01:00
Bernardo Magri
994025f0c8 feat(rofi): real icons, zebra rows, content-fit menus across all themes
Reworked the menu look, palette-driven so it lands on every theme:

  - Real Papirus icons in place of Nerd Font glyphs: a row() helper emits
    rofi's per-row icon protocol, and the five static menus (root, Tools,
    System, Power, Capture) map each entry to a freedesktop icon name
    (verified present in Papirus). Entry text is now clean ("Apps"), the
    case-matching is unchanged.
  - Larger icons via a new t.ui.iconSize knob (36px, generated theme); the
    summer whole-swaps keep their 40px identity.
  - Rounded, roomy rows with subtle zebra striping: alternate rows lift to
    @surface (a faint bg0 wash on the summer cream/slate windows), the
    selected row to @accent — using rofi's normal/alternate/selected row
    parities.
  - Content-fit windows: fixed-num-lines=false so a 6-entry menu stops
    reserving 8 rows of empty space (the launcher still fills + scrolls).
    Dropped the fixed height:50% from the summer .rasi so they size to
    content too — which also unhid their clipped Power/Keybindings rows.
  - Title-cased the menu prompts.

Verified by building the HM config and rendering the generated theme plus
both summer whole-swaps headlessly (sway + grim): icons resolve, zebra
shows, every menu hugs its rows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 22:11:25 +01:00
Bernardo Magri
b0b2a4d732 docs(services): note the restic-nomarchy list/restore wrapper
VM-verified the full batch of opt-in service toggles (libvirt, docker, obs
+ v4l2loopback, ollama, printing, openrgb, wireshark, adb, gamemode,
kdeconnect, restic) in a headless nixosTest — all green, no module bugs.

The one thing worth surfacing: services.restic ships a pre-configured
`restic-nomarchy` wrapper (repository + passwordFile baked in) for listing
and restoring snapshots. Mention it in the option description and README so
the restore path is discoverable — a backup you can't restore is half a
feature.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 21:18:49 +01:00
Bernardo Magri
964a5c98b7 feat(services): openrgb + restic toggles; close out the opt-in services item
Finishing the four remaining "opt-in services" candidates — but two of
them aren't service-shaped, so the package-vs-toggle principle applies:

  - Nextcloud client  → a bare tray app; already in the app-suite menu,
                        not a service.
  - WireGuard         → NetworkManager (on distro-wide) imports .conf
                        tunnels natively, so there's no daemon to "just
                        enable". Only the wg/wg-quick CLI is missing →
                        wireguard-tools added to the app-suite menu.

The two that ARE config-backed become nomarchy.services.* toggles:

  - openrgb → services.hardware.openrgb (daemon + device udev rules).
  - restic  → a small scaffolded surface (repository / passwordFile /
              paths) over services.restic.backups: daily timer, 7/4/6
              retention, --exclude-caches, repo auto-init. Asserts that
              repository + passwordFile are set when enabled. passwordFile
              is typed `str`, not `path`, so a flake-relative secret can't
              be copied into the world-readable store.

README option table and ROADMAP (services now "Seventeen shipped";
cloud-sync / networking / backup / devices areas updated) + the downstream
system.nix examples. Both branches eval-verified; the restic assertions
confirmed firing when repo/password are unset.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 21:02:20 +01:00
Bernardo Magri
c45fb80b79 feat(services): full optional app menu + 7 more opt-in service toggles
Make the whole workstation menu available, all off/commented by default.

home.nix: the bare GUI apps become a categorized commented menu (~50
suggestions across browsers, comms, office, notes, code, graphics, A/V,
media, gaming, files/sync, security, system, local AI) — uncomment to add.

services.nix: the members that need system config (not just a package)
become opt-in nomarchy.services.* toggles, each with a commented example
in the downstream system.nix:
  - docker     → rootful Docker + user in docker group; asserts against the
                 podman docker-compat (both provide the `docker` command)
  - kdeconnect → programs.kdeconnect (opens phone-pairing ports)
  - gamemode   → Feral GameMode daemon
  - adb        → android-tools (programs.adb was removed; systemd ≥258 does
                 the device uaccess udev rules, so no group needed)
  - wireshark  → Qt GUI + user in wireshark group (capture without root)
  - ollama     → local LLM runtime on 127.0.0.1:11434
  - printing   → CUPS + Avahi/mDNS network printer discovery

README option table and ROADMAP (services item now "Fifteen shipped";
local-AI / containers / gaming / devices areas marked) updated. All seven
branches eval-verified with the toggles forced on; the docker/podman
assertion confirmed firing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 20:52:38 +01:00
Bernardo Magri
0c668c2eb1 feat(apps): starter workstation app suite + steam/libvirt/obs services
The "default application suite" roadmap item, but deliberately NOT a
nomarchy.apps.* option surface: a bare package install has no config to
put behind a toggle, so a thin `mkIf x { systemPackages = [p]; }` only
reinvents what a package list already gives. Instead the suite is a
curated home.packages list in templates/downstream/home.nix (extending
the existing `# firefox` convention) — active staples (libreoffice,
vscode, gimp, inkscape, mpv, amberol) plus commented suggestions. The
opt-out is deleting a line; it also keeps the apps out of the live ISO
automatically (the ISO never scaffolds from the template).

The members that DO need system config become nomarchy.services.* opt-in
toggles instead (config behind the switch, like the existing services):
  - steam   → programs.steam (32-bit stack, controller udev, RP ports)
  - libvirt → libvirtd + virt-manager, login user added to libvirtd group
  - obs     → obs-studio + a v4l2loopback virtual camera (exclusive_caps=1)
              selectable as a webcam in Zoom/Teams

README option table, ROADMAP (services item now "Eight shipped"; suite
item marked done with the no-surface rationale) and the downstream
system.nix examples updated to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 20:45:10 +01:00
Bernardo Magri
1f4bd3d5fa docs(readme): document the curated shell aliases in §5 Day-to-day
List the on-by-default zsh aliases (navigation, git, nix, misc) in the
Day-to-day section so they're discoverable from the README, not just by
running `alias`. Note the doc location in the roadmap item.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 17:48:22 +01:00
Bernardo Magri
017bb1aa41 feat(shell): curated git/nix/navigation aliases on by default
Extend the zsh shellAliases in shell.nix with a curated, on-by-default
set: navigation (.., ..., ....), a git block (g, gst, ga/gaa, gc/gcm,
gco/gsw, gb, gd/gds, gl/glg, gp/gpl, gf), a nix block (ns, nr, nfu, nfc,
nsearch, ngc), and path/reload. Same restraint as rg/fd: short where it
helps but never shadowing a real binary — the git set keeps off gs
(ghostscript), and the system/home rebuilds keep their sys-update /
home-update names rather than cryptic aliases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 17:46:17 +01:00
Bernardo Magri
b856bb93e8 docs(roadmap): close the sanitize file-audit; menu grouping is ongoing
The repo-organization re-check found nothing to move: no orphaned modules
(keybinds.nix is a data import, not a HM module), no dead-code markers or
editor/backup cruft, every themes/<slug>.json pairs with its optional
overrides dir, and hosts/{default,live} are the reference + ISO hosts.
Recorded the one open decision: no formatter is declared and the .nix
hand-formatting is deliberate, so adopting nixfmt is a maintainer call,
left untouched. Also marked the menu category grouping a standing
convention — new menu-facing features get placed in the right submenu.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 17:40:50 +01:00
Bernardo Magri
e0ee5b9e7e feat(menu): group the rofi picker into Tools / System submenus
The root picker had grown to 16 flat entries. Collapse it to six —
Apps · Theme · Tools › · System › · Power · Keybindings — with Tools
(Calculator, Clipboard, Emoji, Files, Web, Capture, Ask) and System
(Network, Bluetooth, DND, plus the self-gated Snapshots / Power-profile)
as submenus the dispatcher routes via `nomarchy-menu tools|system`. Each
submenu ends in a ← Back entry that re-opens the root. The direct
SUPER+CTRL+<mnemonic> binds still reach the leaves straight (bypassing
the menu), and the gated entries still hide when unavailable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 17:35:03 +01:00
Bernardo Magri
f68b245d92 feat(services): add podman, flatpak (+ Flathub) and pika backup
Extend nomarchy.services.* with three more opt-in toggles:
- podman: rootless containers, `docker` aliased to it, container DNS, and a
  subuid/subgid range for the login user.
- flatpak: services.flatpak + a oneshot that adds the Flathub remote
  system-wide (idempotent, retries when online).
- pika: ships pika-backup, the GUI for scheduled Borg backups.
Commented examples in the downstream system.nix template, per convention.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 17:15:45 +01:00
Bernardo Magri
fb748c217c feat(services): opt-in Tailscale + Syncthing (nomarchy.services.*)
Start the opt-in services surface: nomarchy.services.{tailscale,syncthing},
off by default, in modules/nixos/services.nix. Tailscale ships the daemon
(authenticate with `sudo tailscale up`); Syncthing runs as the login user
with its GUI on 127.0.0.1:8384 (overrideDevices/Folders off so GUI-managed
folders survive rebuilds). username is read lazily, only when Syncthing is
on. Commented examples in the downstream system.nix template per the opt-in
convention.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 17:08:41 +01:00
Bernardo Magri
8d3911de1a docs(template): ship opt-in features as commented examples downstream
Convention: an off-by-default feature that needs nomarchy.* settings in the
downstream files should appear commented-out in templates/downstream/{home,
system}.nix, so a new install enables it by uncommenting + tweaking rather
than hunting the docs for the option name. Apply it now: night light,
nomarchy.monitors, per-device keyboard layouts (home.nix) and power
management (system.nix). Also fix the stale keyboard.layout note
(console/LUKS follow xkb automatically now). Documented in README S6.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 16:53:13 +01:00
Bernardo Magri
6ad80c045e feat(nightlight): scheduled blue-light filter via hyprsunset
Add nomarchy.nightlight (opt-in): a scheduled colour-temperature shift via
the HM services.hyprsunset module -- warm (.temperature, default 4000K) at
night, identity (no shift) by day, switching at .sunset / .sunrise. Two
time-based hyprsunset profiles, so hyprsunset handles the schedule and the
on-login state. New modules/home/nightlight.nix, imported in the home module.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 16:37:03 +01:00
Bernardo Magri
54c6e100fb docs(roadmap): organize the menu picker into category submenus
The root picker has grown into a long flat list; group it into category
submenus (System / Tools / Look & Feel / Power) with the dispatcher routing
nomarchy-menu <category> to its leaf modules, keeping the SUPER+CTRL+<mnemonic>
binds as direct fast paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 16:29:30 +01:00
Bernardo Magri
eb76bd61b4 docs(roadmap): note btrfs-assistant segfault; snapper backend VM-verified
A VM regression test caught that btrfs-assistant 2.2 segfaults on launch
inside libbtrfsutil.so.1.4.0 -- a library ABI mismatch in nixpkgs 26.05, not
a GL/VM artifact (crashes with software GL and every Qt platform; the fault
is in a btrfs library). The snapshot menu wiring is correct and the app is
installed, but the GUI doesn't open. The snapshot backend is unaffected and
is itself VM-verified (full BTRFS+LUKS install: root+home snapper configs, a
/home timeline snapshot, /home/.snapshots a real subvolume, the oneshot
Result=success). Keep the entry, document the bug pending a nixpkgs fix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 15:43:46 +01:00
Bernardo Magri
71f37bfc30 feat(keyboard): interactive new-keyboard layout prompt + persist
The runtime-remember complement to nomarchy.keyboard.devices. Set
nomarchy.keyboard.layouts (candidate layouts) and a nomarchy-keyboard-watch
daemon runs (exec-once): it polls hyprctl devices, and when a keyboard
connects after login that isn't declared and hasn't been chosen before, it
pops a rofi layout picker, applies the choice via hyprctl switchxkblayout (an
index into the candidate set carried by input.kb_layout), and remembers it
per-device in ~/.local/state -- re-applied silently on later reconnects. The
boot-time set (incl. the built-in keyboard) is never prompted.

Pure bash + jq/hyprctl/rofi (all in the session PATH); state lives outside
the flake (a stateful runtime piece by design). Eval + bash-syntax verified;
the hotplug behaviour needs an on-hardware test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 17:43:59 +01:00
Bernardo Magri
69f959365e docs(roadmap): interactive new-keyboard layout prompt + persist
A runtime-remember complement to the declarative nomarchy.keyboard.devices:
a daemon watches Hyprland's socket, pops a rofi layout picker when an unknown
keyboard connects, applies it, and persists per-device so it re-applies on
reconnect — optionally writing the choice back into nomarchy.keyboard.devices.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 17:32:05 +01:00
Bernardo Magri
aef45b3c8d feat(keyboard): per-device layout for external keyboards
Add nomarchy.keyboard.devices ({ "<hyprctl-device-name>" = { layout; variant; }; })
generating Hyprland `device` blocks that override the session
nomarchy.keyboard.layout for a named keyboard -- e.g. an external board
that's physically a different layout than the laptop's built-in one.
Hyprland applies it whenever that device connects, so the external keyboard
"remembers" its layout the declarative way. A Waybar hyprland/language
indicator shows the active layout, placed only when more than one layout is
in play (a comma in the session layout, or any per-device override) so
single-layout bars stay clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 17:27:28 +01:00
Bernardo Magri
0897391cfb feat(snapshots): desktop browse/restore + snapshot /home by default
Surface snapper snapshots from the desktop: `nomarchy-menu snapshot` (in the
SUPER+M picker, self-gated) launches btrfs-assistant, the polkit-aware
browse/diff/restore/rollback UI -- safer than a fat-fingerable rofi rollback
for a destructive root-only op. Shipped system-side gated on
nomarchy.system.snapper.

Also snapshot /home by default (hourly 5 / daily 7 / weekly 4) when it's its
own BTRFS subvolume -- the installer only set up snapper for /. A boot
oneshot creates the required /home/.snapshots subvolume if missing, so
already-installed machines get it too (no disko change).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 17:14:05 +01:00
Bernardo Magri
5c83b52727 docs: mark the GTK/Qt color-scheme portal confirmed in a live session
Verified this session in headless QEMU: the org.freedesktop.appearance
color-scheme portal reads 1 on a dark theme and 2 after switching to a light
one, so the dconf value reaches GTK4/Qt apps. Removes the stale "needs a
live session to confirm" note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 16:47:59 +01:00
Bernardo Magri
0751102915 fix(waybar): show the power-profile indicator in the summer themes
custom/powerprofile only appeared in the generated bar -- its exec was a
writeShellScript store path, which can't go in the summer themes' static
whole-swap waybar.jsonc, so summer-day/night were missing it (the DND bell
already had parity). Promote powerProfileStatus/Cycle to named
writeShellScriptBins on PATH (waybar.nix home.packages) and reference them
by bare name, then add custom/powerprofile to both summer waybar.jsonc +
their waybar.css. Same pattern as the swaync bell.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 16:46:45 +01:00
Bernardo Magri
5c59da73e7 docs(roadmap): full hardware enablement beyond nixos-hardware
nixos-hardware covers basic per-model enablement, but advanced features
(keyed on CPU/GPU generation) are left to the user. Capture a big item:
extend the installer's autodetection + a nomarchy.hardware.* surface to turn
on safe features automatically (opt-out) and gate the heavy/experimental
ones (opt-in), without per-feature fiddling. Worked example on the ThinkPad
T14s (Ryzen 7 PRO 7840U + Radeon 780M): ROCm (gfx1103 override), Ryzen AI
NPU/XDNA, AMD P-State EPP, VA-API, fprintd biometrics (fwupd already ships),
SSD fstrim.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 10:35:07 +01:00
Bernardo Magri
42801548b7 feat(displays): declarative nomarchy.monitors + nwg-displays arranger
Add a per-output monitor schema (name / resolution / position / scale /
transform / mirror / bitdepth / vrr / disable) that generates Hyprland
`monitor` rules, keeping the ,preferred,auto,1 wildcard as the fallback.
Hyprland applies the rules on hotplug, so a declared external/dock output
arranges itself on connect (no kanshi -- it fights Hyprland's own output
management). Default [] -> wildcard only, so no change for existing setups;
set wayland.windowManager.hyprland.settings.monitor directly to override.

nwg-displays ships behind nomarchy.displays.enable (default true) as an
interactive arranger -- a helper to discover values; the declarative config
stays the source of truth (its output file isn't sourced).

Remaining (roadmap): docked/undocked profile switching, workspace-to-monitor
binding.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 10:22:18 +01:00
Bernardo Magri
1b0eeeaf6c fix(idle): don't lock before an encrypted hibernate (was: unlock after)
The previous nomarchy-hibernate-unlock ran `pkill hyprlock` after a
hibernate resume, but killing a Wayland session-lock client without
releasing the lock trips hyprlock's "go to a tty" crash failsafe -- the
compositor keeps the screen locked for safety. So resume showed a hyprlock
error screen instead of unlocking.

Fix it the right way: never engage the lock before an encrypted hibernate
(the LUKS passphrase at resume is the gate). Replace the post-resume unlock
with a nomarchy-lock-before-sleep unit that takes over hypridle's
before_sleep_cmd: it locks on the RAM-resume sleeps (suspend / hybrid-sleep
/ suspend-then-hibernate) always, and on hibernate.target only when the disk
is unencrypted. idle.nix drops before_sleep_cmd accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 10:15:31 +01:00
a606c0d498 docs: log power-profile Waybar parity as a follow-up
The custom/powerprofile indicator is missing from the whole-swap summer
themes (its exec uses Nix-built script paths that can't go in static
JSON). Note the fix (promote the scripts to named bins on PATH) and the
general "new module → also add to whole-swap themes" rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 21:12:38 +01:00
cd495d1720 fix(dnd): add the notification bell to the whole-swap summer themes
The DND bell only landed in the generated Waybar config; summer-day and
summer-night ship waybar.jsonc whole-swaps that replace it entirely, so
they'd have shown no bell. Add custom/notification (swaync-client -swb,
left-click panel / right-click DND) to both legacy layouts with their
FontAwesome bell / bell-slash glyphs, and style it alongside the other
right-side modules in each waybar.css.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 21:08:01 +01:00
dbcb8efd1e feat(dnd): swaync Do-Not-Disturb toggle + Waybar bell indicator
Adds a Do-Not-Disturb story on top of swaync:

- Waybar `custom/notification` module via `swaync-client -swb` — streams
  the notification count + DND state (no polling). Left-click toggles the
  panel, right-click toggles DND; bell-off glyph + muted color when DND is
  on, accent when notifications are waiting.
- `nomarchy-menu dnd` toggle in the root picker and bound to SUPER+CTRL+D
  (so it shows in the SUPER+? cheatsheet). Turning DND off confirms with a
  toast; turning it on is silent — notifications are suppressed and the
  bell-off icon is the cue.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 21:01:11 +01:00
07e467027b feat(nix): silence the "Git tree is dirty" warning on rebuilds
The downstream flake at ~/.nomarchy is a live working tree by design —
nomarchy-theme-sync rewrites theme-state.json on every switch — so Nix's
dirty-tree warning fired on every sys-update/home-update and was just
noise. Default nix.settings.warn-dirty to false (mkDefault, overridable).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 20:53:18 +01:00
9a5473e179 docs: record the branch/release model + sanitize progress
Document the main=dev / v1=release-pointer model in flake.nix (where the
v1 ref is defined) and mark the repo-sanitize roadmap items shipped
(installer prune, option-table reconcile, settings untrack, branch
realignment).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 20:48:06 +01:00
db6a0ba455 chore: untrack .claude/settings.local.json (machine-local)
It holds this machine's Claude Code permission allowlist — local by
convention (the `.local` suffix; settings.json is the shared one), so it
shouldn't be versioned. Remove from tracking (keeping the working file)
and gitignore it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 20:45:54 +01:00
8c47716f9a chore(install): stop writing distro-default config into system.nix
console.useXkbConfig and boot.initrd.systemd.enable are set distro-wide
(lib.mkDefault true in modules/nixos/default.nix, since the LUKS-keymap
fix), so the installer rewriting them in the generated system.nix was
redundant. Drop them there and from the offline-pin test fixture in
flake.nix — the nomarchy module still defaults them on, so the closure
(and the pin set) is unchanged; verified the values still resolve true
and `nix flake check` passes. Only the machine-specific xkb layout is
written now. Adjusts the README keyboard-option wording to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 20:42:36 +01:00
f60f3655f9 merge: adopt the v1 development line onto main
Brings main current with the 51 commits of post-rewrite feature work
(laptop power, idle cohesion, menu plugins, fwupd, docs restructure)
that had been accumulating on v1. New model: main is the development
default; v1 is the release pointer downstreams pin (?ref=v1), advanced
to main once a batch is tested. Rolling, no tags.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 20:38:36 +01:00
afdb928ed7 docs: split roadmap into docs/ROADMAP.md, reconcile README
The roadmap + known-issues had grown to ~280 lines, nearly half the
README. Moved both into docs/ROADMAP.md (forward-looking plans + a log of
shipped fixes) and left a short pointer, so the README is back to a
focused entry point (572 -> 302 lines).

Also fixed drift surfaced in the pass:
- layout tree: add modules/nixos/power.nix, modules/home/{keybinds,keys,
  fastfetch}.nix and docs/ROADMAP.md, which were missing.
- option table: add keys.enable, fastfetch.enable, system.snapper.enable
  (default false — the installer opts in) and system.greeter.autoLogin.

OVERRIDES.md, TESTING.md and the downstream template README were checked
and are accurate (.#default / .#me names and the 21-preset count match),
so they're left as-is. Docs stay Markdown-in-repo — no docs site.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 18:29:16 +01:00
882ba6646b revert(menu): keep the hand-rolled fd files module, drop rofi-file-browser
The rofi-file-browser-extended navigate-a-tree model felt worse than flat
fuzzy-find for a quick launcher (yazi already covers real browsing), so
`files` goes back to `fd` → `rofi -dmenu` → xdg-open. calc (rofi-calc)
and emoji (rofi-emoji) stay. Re-adds `fd` to the module's packages and
notes the dropped plugin in the roadmap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 18:16:06 +01:00
db202f90e4 feat(menu): adopt rofi plugins for calc, files, emoji
Replace the hand-rolled calc/files modules with purpose-built rofi modi
(via programs.rofi.plugins) and add an emoji picker — all themed through
the same .rasi as every other modi:

- calc -> rofi-calc: live results as you type via libqalculate directly,
  which also dodges the qalc CLI's "15% of 200" -> rem(15, 1 B) misparse.
  Enter copies; the menu persists to chain calculations. Drops the
  libqalculate (qalc CLI) dependency.
- files -> rofi-file-browser-extended: live directory navigation +
  xdg-open, replacing the flat 50k-cap `fd` dump of $HOME. yazi (SUPER+E)
  stays the power browser; `fd` already ships via shell.nix.
- emoji -> rofi-emoji (new module): glyph picker, copies through the
  plugin's Wayland clipboard adapter. Bound to SUPER+CTRL+E in
  keybinds.nix (so it lands in the SUPER+? cheatsheet too).

rofi 2.0 rebuilds cleanly with all three plugin .so (ABI-matched, same
nixpkgs). README roadmap updated: calc rework marked shipped, with a
follow-up item for the script-based plugins (network/secrets/audio).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 18:09:11 +01:00
51c11e1df3 feat(idle): suspend on battery only, cohering with power management
hypridle's suspend listener now runs `nomarchy-on-ac || systemctl
suspend`, so a plugged-in machine no longer suspends itself mid-idle
(long builds, media, presentations survive). It also fires sooner —
15 min, vs the old fixed 30 — since it now only applies unplugged.
Lock and screen-off are unchanged on both power sources, and logind's
lid handling stays at its sensible defaults (suspend on lid close,
ignore when docked).

Closes the idle-cohesion follow-up under the laptop-power roadmap item.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 17:53:49 +01:00
6a22eba0c4 docs: add roadmap item for a full docs review & restructure
A dedicated prose pass distinct from the repo-sanitize item: split the
~200-line roadmap out of the README, reconcile the option tables with the
live nomarchy.* surface, and review docs/ + the downstream template for
drift.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 17:46:30 +01:00
c47eb5f688 feat(system): enable fwupd by default; document power options
Ship `services.fwupd.enable` distro-wide (mkDefault) for firmware updates
via LVFS — the daemon + metadata-refresh timer only, no automatic
flashing, so applying an update stays an explicit `fwupdmgr update`. A
no-op where LVFS sees no devices; overridable natively. Sits with the
other mkDefault desktop services rather than a nomarchy toggle (it's a
single service, like upower).

Also documents the `nomarchy.system.power.*` options in the README table
(missed when the power module landed) and adds a short note on the
fwupd default.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 17:44:23 +01:00
00f5311499 feat(power): laptop power management (power-profiles-daemon + TLP)
Adds a `nomarchy.system.power.*` surface (modules/nixos/power.nix),
replacing the bare `services.upower` (Waybar reporting only) baseline:

- power-profiles-daemon ships by default; switched through polkit (no
  root prompt). TLP is the opt-in `backend = "tlp"` for deeper battery
  tuning — the two are mutually exclusive (asserted).
- thermald behind `power.thermal.enable` (Intel-only).
- `power.batteryChargeLimit` (e.g. 80): a backend-independent sysfs
  oneshot writes charge_control_end_threshold; gated on `power.laptop`.

Switcher + indicator live home-side and self-gate on a battery being
present + powerprofilesctl running, so they hide on desktops and under
TLP — no system->home wiring (like the Waybar battery widget):

- rofi.nix: `nomarchy-menu power-profile` module + a picker entry shown
  only on laptops with PPD.
- waybar.nix: first `custom/*` module — click cycles the profile.

Installer writes `power.laptop = true` (battery probe) and
`power.thermal.enable` (GenuineIntel) into the generated system.nix, and
scaffolds the charge limit commented-out.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 17:35:42 +01:00
Bernardo Magri
8853f6ae49 feat(idle): no double-unlock after an encrypted hibernate resume
hypridle locks hyprlock before every sleep -- right for suspend, but
redundant for hibernate: the LUKS passphrase entered at boot already gates
the resume, so the user typed a password twice. Add a nomarchy-hibernate-
unlock systemd unit (WantedBy hibernate.target, After systemd-hibernate.service
=> runs post-resume) that dismisses hyprlock, gated on the disk being LUKS-
encrypted. Suspend (and the RAM-resume phase of suspend-then-hibernate) keep
locking -- they have no passphrase gate; an unencrypted hibernate keeps its
lock too. idle.nix gains a pointer comment; roadmap item marked done.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 13:06:10 +01:00
Bernardo Magri
e0182ae7dd docs: explain the sys-update -> home-update ordering
home-update rebuilds the desktop against the current flake.lock and never
touches it; only sys-update runs `nix flake update`. So pulling a distro
change that affects the home layer requires sys-update first (updates the
lock), then home-update -- the reverse order rebuilds against stale inputs
and silently skips the new home-side changes (hit while testing the mic
fix). Also note hyprctl reload after a home-side keybind change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 12:51:01 +01:00
Bernardo Magri
58096c09ed fix(hyprland): show the mic level in the mute OSD
The wpctl-based mic toggle lost the volume bar the native swayosd input OSD
used to draw -- it only showed an icon + text. swayosd 0.3.x exposes
--custom-progress (0.0-1.0), so read the level back from wpctl after the
toggle and render icon + bar (muted/active glyph via --custom-icon),
matching the output-volume OSD. Parsing is pure bash builtins so the script
needs no PATH beyond the two pinned tools.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 12:51:01 +01:00
Bernardo Magri
7da6bb979e docs: expand roadmap (power, opt-in services, display/UX, control center)
Captures a batch of new roadmap items from a planning pass:
- repo sanitize/organize (incl. the now-redundant console.useXkbConfig /
  boot.initrd.systemd.enable the installer writes, post LUKS-keymap fix)
- laptop power/battery management (PPD-vs-TLP, thermald, charge thresholds)
- opt-in services & integrations (Nextcloud/Syncthing, LM Studio/Ollama,
  containers, Tailscale, Steam/OBS, printing, backups, Flatpak)
- display/monitor management (hotplug profiles, dock story)
- night light (hyprsunset), runtime keyboard-layout switching, swaync DND
- snapshot browse/restore UX, update-awareness indicator
- a "nomarchy" control center + first-boot welcome

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 12:27:32 +01:00
Bernardo Magri
3f36183021 feat(menu): Google web search; note calc rework in the roadmap
The web module now opens google.com/search instead of DuckDuckGo. Also log
a roadmap item to rework calc: qalc -t misparses common phrasings (15% of
200 -> rem(15, 1 B)) and the result only shows in the next menu's -mesg
line -- move toward live results as you type.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 12:11:20 +01:00
Bernardo Magri
d9301ad954 fix(yazi): previewer match field name -> url (yazi 26.x)
yazi 26.x renamed the previewer/fetcher match key from name to url. The
fetchers were updated but the markdown previewer still used name, so the
whole [plugin] config failed to parse ("at least one of 'url' or 'mime'
must be specified") and yazi fell back to its presets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 12:11:20 +01:00
Bernardo Magri
66f58fa228 fix(hyprland): mic mute via wpctl -- swayosd 0.2.1 input-mute is a no-op
swayosd-client --input-volume mute-toggle draws the OSD but never flips the
default source's mute (its output-mute path works; input does not). Confirmed
on hardware: wpctl set-mute @DEFAULT_SOURCE@ toggle flips the state, swayosd
does not. Do the real toggle with wpctl and keep an OSD via swayosd's
--custom-icon/--custom-message.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 12:11:20 +01:00
Bernardo Magri
2c8e0b47f9 fix(keyboard): carry the configured layout to the LUKS prompt
Setting only services.xserver.xkb.layout moves the graphical session but
leaves console.useXkbConfig unset, so the virtual-console keymap -- and the
systemd initrd the LUKS passphrase prompt runs in -- fall back to US (seen
on a Latitude 5410: X11 Layout gb, VC Keymap unset, LUKS prompt US).

Default console.useXkbConfig + console.earlySetup + boot.initrd.systemd.enable
distro-wide, so xkb.layout alone reaches the console and the encrypted-disk
prompt. Moved the latter two out of plymouth.nix -- they no longer hinge on
the splash being enabled. All mkDefault: an explicit console.keyMap or a
scripted initrd still wins.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 12:11:20 +01:00
Bernardo Magri
69f7ae9051 feat(branding): fastfetch logo + Nomarchy.ttf glyph in the Waybar button
Two branding follow-ups, using the vendored legacy assets:

- fastfetch (modules/home/fastfetch.nix, nomarchy.fastfetch.enable): the
  vector logo recolored to the palette accent and rendered to compact
  block-art via chafa at build time (so it tracks the theme), fronting a
  curated module list. Replaces the oversized legacy ASCII.
- Waybar logo glyph: vendor Nomarchy.ttf (modules/nixos/branding/),
  install it via fonts.packages, and switch the summer-day/night menu
  buttons to its U+F000 mark with `font-family: Nomarchy` pinned in CSS
  (Nerd Fonts also occupy U+F000, so the pin is required). Glyph stored as
  the  JSON escape for robustness.

Also log a roadmap item for a quality-of-life alias collection.

Verified: font family resolves as "Nomarchy" and the ttf maps U+F000;
both summer jsonc parse; chafa logo builds headless; nix flake check passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 22:07:28 +01:00
Bernardo Magri
4017b6cff6 fix(stylix): drive GTK4/Qt dark-light from the palette via color-scheme
Stylix set polarity and the GTK theme but not the XDG portal's
org.freedesktop.appearance color-scheme, which GTK4/libadwaita and Qt6
apps actually read to choose dark vs light — so a light theme could still
render those apps dark (and vice-versa).

Set dconf org/gnome/desktop/interface color-scheme to
prefer-light/prefer-dark from theme.mode in stylix.nix.
xdg-desktop-portal-gtk already ships and programs.dconf is on system-side,
so the portal exposes it to apps.

Also log two branding follow-ups from the legacy assets: fastfetch ASCII
logo (logo.txt) and the Nomarchy.ttf glyph for the Waybar menu button.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 21:53:08 +01:00
Bernardo Magri
cde279af0b feat(branding): ISO boot splash from the vendored Nomarchy logo
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 <noreply@anthropic.com>
2026-06-13 21:46:40 +01:00
Bernardo Magri
6513908067 feat(branding): tuigreet greeting + branded MOTD
Round 2 of distro branding, text half: tuigreet now shows
'Welcome to <distroName>', and users.motd carries a branded banner that
doubles as a cheat sheet for the distro helpers (sys-update, home-update,
nomarchy-theme-sync, SUPER+?). Both key off system.nixos.distroName so the
brand name stays in one place.

Deferred (need an asset / a boot test): ISO splashImage/grubTheme art and
the distroId switch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 21:35:47 +01:00
Bernardo Magri
fdb0685eec docs: mark plymouth contrast done; log GTK/Qt light-dark issue
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 21:18:37 +01:00
Bernardo Magri
e411d35544 fix(plymouth): recolor splash art from the palette for contrast
The shipped boot art was a fixed navy that vanished against dark theme
bases. Recolor each element from theme-state.json at build time (flat
fill, alpha preserved): foreground glyphs (logo, padlock, password dots)
→ text, the field/track boxes (entry, progress_box) → surface, and the
progress fill → accent. text/surface both contrast with base in either
polarity, so the splash now reads on light and dark themes alike.

Adds imagemagick as a build-time input to the theme derivation. Like the
background tint, this follows the theme as of the last system rebuild.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 21:17:42 +01:00
Bernardo Magri
3757e7d66f feat(keys): SSH + GPG agent via gpg-agent, pinentry-qt
Add modules/home/keys.nix (nomarchy.keys.enable, default on): one agent —
services.gpg-agent with enableSshSupport fronts SSH, so a single pinentry
handles every passphrase (GPG signing/decryption and SSH key unlocks).
pinentry-qt for a reliable native-Wayland prompt under Hyprland, themed by
Stylix's Qt config. Cache TTLs 30 min / 2 h.

SSH_AUTH_SOCK is exported by the agent's zsh integration (terminal git/ssh
is the supported path). gnome-keyring stays the Secret Service — modern
versions run no SSH agent, so there's no socket contention; screen lock
doesn't flush the agent cache.

nix flake check passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 20:50:45 +01:00
Bernardo Magri
05d995f8e0 feat(keybinds): direct SUPER+CTRL binds for the menu functions
Each nomarchy-menu module is now reachable directly, not just through the
SUPER+M picker: SUPER+CTRL+ V clipboard · C calc · W web · F files ·
N network · B bluetooth · S capture · A ask. Added to keybinds.nix (the
single source), so they render in the SUPER+? cheatsheet too. No key
collisions; nix flake check passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 20:39:12 +01:00
Bernardo Magri
f6c4a2a591 fix(waybar): stop summer themes rendering phantom workspaces
summer-day/summer-night showed all 10 workspace icons up-front. The cause:
legacy used the deprecated `persistent_workspaces` (underscore), which
current Waybar silently ignores — so legacy only ever showed *existing*
workspaces. The v1 port rewrote it to the modern `persistent-workspaces`
(hyphen), which Waybar honours, surfacing all ten as phantoms.

Drop the block from both summer waybar.jsonc whole-swaps. The other themes
render from waybar.nix, which never declared persistent-workspaces, so they
already only show existing workspaces — no change needed there.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 20:35:25 +01:00
Bernardo Magri
7c34eed2ca fix(theme): solid per-theme hyprland borders, matching legacy
v1 forced an accent→accentAlt 45deg gradient on every theme's window
border; the legacy identity themes all used a *solid* border — accent for
nord/retro-82/lumon, the text tone for kanagawa/summer-day/summer-night.

Add a palette-resolved `border` field ({active, inactive}, each a palette
key or literal hex) to the theme schema with accent/overlay defaults in
theme.nix, consume it solid in hyprland.nix, and declare it in every
preset (and the live state). Declaring it everywhere is required because
`nomarchy-theme-sync apply` deep-merges presets — an omitted field would
stick across switches, like colors already are fully specified per theme.

All six identity themes resolve to their exact legacy active border
(verified: nord #81a1c1, retro-82 #faa968, lumon #f2fcff, kanagawa
#dcd7ba, summer-night #d3c6aa, summer-day #5c6a72). nix flake check passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 20:32:18 +01:00
Bernardo Magri
d252f01f17 feat(shell): flat starship prompt, drop the powerline styling
The powerline look (the `[]` separator glyph + bg-filled segments) didn't
read well. Switch to a flat prompt: bold-accent directory, warn git
branch, subtext git-status/duration, `❯` character — plain colored text,
no background fills, each module carrying its own trailing space so there
are no stray gaps. Also reference cmd_duration in `format` (it was
configured but never shown).

Generated starship.toml verified valid; nix flake check passes. Visual
pass still wants a live terminal.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 20:18:46 +01:00
Bernardo Magri
28a2f5d5ae fix: yazi fetcher group field, xfce package renames, enable nix-ld
Three quick known-issue fixes:

- yazi: 26.x made the fetcher `group` field required, so the git
  prepend_fetchers failed to parse and yazi fell back to presets. Add
  `group = "git"` to both entries (the git plugin's setup() only renders
  the linemode — the fetcher still needs registering here).
- file-manager: xfce.exo and the three Thunar plugins moved to top-level;
  use pkgs.xfce4-exo / pkgs.thunar-{archive-plugin,volman,media-tags-plugin}.
  Clears the eval-time deprecation warnings.
- nix-ld: enable programs.nix-ld distro-wide so foreign dynamically-linked
  binaries (downloaded tools, npx-fetched claude-code, language servers)
  run without patchelf.

Also drops the now-stale claude-code mention from the allowUnfree comment
(the ask module uses npx). nix flake check passes; xfce warnings gone.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 20:14:11 +01:00
Bernardo Magri
f06d7f361c docs: roadmap item for SSH/GPG agent + graphical pinentry
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 20:06:06 +01:00
Bernardo Magri
58d79aad17 feat(menu): network/bluetooth/capture/ask modules + keybindings cheatsheet
Build out the rofi menu system roadmap item:

- New nomarchy-menu modules: network (nmtui), bluetooth (blueman-manager),
  capture (grim/slurp submenu → clipboard/file), ask (free-text → claude
  CLI in a terminal), and keybinds (the SUPER+? cheatsheet).
- modules/home/keybinds.nix is now the single source of truth for both the
  Hyprland bind strings and the cheatsheet, so the two can't drift —
  hyprland.nix maps it into `bind`, rofi.nix renders the padded two-column
  sheet (generated/mouse binds live in its `extra` rows).
- New binds: SUPER+Space (quick launch), SUPER+M (main menu), SUPER+?
  (cheatsheet). SUPER+D stays rofi -show drun.
- Ask Claude pulls claude-code fresh from npm via `npx
  @anthropic-ai/claude-code@latest` (the nixpkgs package lags model
  releases); nodejs is bundled for npx.

nix flake check passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 19:59:46 +01:00
Bernardo Magri
60138e20d0 docs: log known issues & follow-ups in the roadmap
Yazi prepend_fetchers group field, starship powerline removal, xfce
package deprecations, rofi function keybinds, nix-ld default, hyprland
border colors, and waybar phantom workspaces.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 19:25:40 +01:00
Bernardo Magri
df7c0ef7ae feat: zsh default shell + starship/bat/eza/zoxide shell experience
zsh is now the default login shell (programs.zsh.enable +
users.defaultUserShell, mkOverride 500 to beat bash.nix's mkDefault;
per-user shell= still overrides). modules/home/shell.nix configures the
interactive experience (nomarchy.shell.enable):

- zsh: completion, autosuggestions, syntax highlighting, big shared
  history, autocd.
- starship prompt themed from the palette (a `nomarchy` palette built
  from theme-state.json colors).
- bat as cat (theme "ansi" → tracks the terminal/theme palette), eza as
  ls (icons + git + dirs-first), zoxide as cd (--cmd cd).
- rg/fd shipped as themselves — deliberately NOT aliased over grep/find
  (flag differences surprise).

home.shell.enableZshIntegration = true is the single lever; starship,
eza, zoxide, ghostty and yazi all emit their zsh hooks from it (no
per-module edits). Verified: flake check green, default shell resolves
to zsh, .zshrc carries the starship/zoxide/eza/yazi hooks + aliases,
starship palette renders, all tools in the live ISO closure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 16:25:21 +01:00
Bernardo Magri
f97054c804 feat: icon themes — Papirus, resolved from the JSON, for GTK + rofi
Ships papirus-icon-theme and resolves an icon-theme name once in
theme.nix → nomarchy.theme.iconTheme: the JSON's optional `icons` field,
else Papirus-Dark/Light picked by `mode`. That single value feeds:
- Stylix `stylix.icons` → gtk.iconTheme (Thunar and GTK apps)
- rofi `show-icons` + `icon-theme` (the launcher now shows app icons)

A preset or theme-state.json can set `icons` to any theme in the icon
package to override per theme.

Verified: flake check green; iconTheme resolves Papirus-Dark for
tokyo-night and Papirus-Light for summer-day; gtk.enable true with
gtk.iconTheme.name set; papirus in home.packages and the live ISO
closure; rofi config.rasi carries icon-theme + show-icons:true. The
rendered icons need a real session to see.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 16:12:19 +01:00
Bernardo Magri
520c878bb3 feat: swayosd on-screen display for volume/brightness/mute
The media keys called wpctl/brightnessctl directly with no visual
feedback — changing volume showed nothing on screen. Now they drive
swayosd-client, which performs the action AND shows a themed OSD.

- modules/home/osd.nix: services.swayosd, style.css generated from the
  palette (base bg, accent progress/border); nomarchy.osd.enable.
- hyprland media binds → swayosd-client (--output-volume raise/lower/
  mute-toggle, --input-volume mute-toggle, --brightness raise/lower).
- modules/nixos: services.udev.packages = [ swayosd ] installs the
  backlight rule (chgrp video + g+w) so brightness works for video-group
  users without root (the installer/live user is in video).

swaync is unaffected (it was already running — this was purely the
missing OSD). Verified: flake check green, swayosd.service bound to
graphical-session.target, hyprland config verifies, swayosd in the live
ISO closure. On-screen rendering needs a real session to confirm.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 16:04:55 +01:00
Bernardo Magri
084b2a0500 feat(theme-sync): persistent switch notification so slow switches read as progress
The "Applying theme — rebuilding…" toast used the default timeout, so it
vanished seconds into a multi-minute home-manager switch — leaving the
user with no signal and the impression the selection failed. Now it's
persistent (timeout 0) and all theme notifications share a synchronous
tag, so swaync REPLACES it in place with "Theme applied ✓" (or a critical
failure toast that persists) when the rebuild finishes.

notify() grew persistent/urgency/summary params. Honest indeterminate
feedback — HM exposes no percentage, so no fake progress bar.

Verified: py_compile clean; the full apply→switch→notify path runs end to
end (dummy NOMARCHY_REBUILD). The in-place replacement is visible only in
a real swaync session.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 15:52:41 +01:00
Bernardo Magri
20df0d8a60 docs: fold todo.md items into the roadmap
Theme-switch progress feedback; per-theme icon themes (unblocks rofi
show-icons); starship prompt + modern-CLI aliases (bat/eza/rg/fd/zoxide);
opt-out default app suite (nomarchy.apps.*); Plymouth logo contrast fix;
hibernate double-unlock (hyprlock redundant after LUKS resume); plus a
keybindings-cheatsheet menu module and the SUPER+Space / SUPER+M binds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 15:48:50 +01:00
Bernardo Magri
abfe872109 feat(themes): port legacy rofi identities for summer-day/night
themes/<slug>/rofi.rasi whole-swaps for the two themes that had a
distinct launcher look in the legacy branch — inverted window (bg=fg),
green inputbar, yellow bottom-border accent, rounded. Adapted: dropped
the configuration{} block (rofi.nix owns modi/terminal/show-icons) and
swapped the unshipped Iosevka 17 for a shipped Nerd Font.

Verified: both .rasi parse under `rofi -dump-theme`; the whole-swap
selects per active theme (summer-night → #2d353b/#a7c080, summer-day →
#fdf6e3, others → the generated palette theme); flake check green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 15:45:39 +01:00
Bernardo Magri
961314ea86 feat(home): switch launcher/menu from fuzzel to rofi 2.0
rofi 2.0 landed in nixpkgs 26.05 with native Wayland (mainline upstreamed
the lbonn rofi-wayland fork — `wayland enabled`), so the original reason
to prefer fuzzel (rofi being X11-only / needing a community fork) is gone.
rofi's `.rasi` is far more expressive than fuzzel's flat INI, which lets
the launcher be a proper themed hero surface and revives the legacy
per-theme launcher designs.

- modules/home/rofi.nix replaces fuzzel.nix: per-element theme generated
  from theme-state.json (accent border, highlighted selection, rounded
  inputbar) via lib.formats.rasi.mkLiteral; themes/<slug>/rofi.rasi
  whole-swap; the nomarchy-menu dispatcher re-pointed to `rofi -dmenu`
  (power/theme/clipboard/calc with -mesg/files/web + root picker).
- SUPER+D is now `rofi -show drun`; the menu binds are unchanged.
- nomarchy.fuzzel.enable → nomarchy.rofi.enable; fuzzel dropped from
  home.packages. Pango handles nf-glyph fallback (no explicit font list
  needed as fuzzel's fcft did). show-icons off until an icon theme ships.

Verified: flake check green, HM generation builds, the generated
theme.rasi parses under `rofi -dump-theme`, Hyprland config verifies.
Not verified: rofi's on-screen rendering needs a real session.

Docs: README menu/override/roadmap sections and the module tree updated;
the per-theme launcher roadmap item now points at porting the legacy
rofi.rasi designs (the whole-swap mechanism is in place).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 14:41:46 +01:00
Bernardo Magri
76582c1ee9 feat: file manager — yazi (flagship TUI) + Thunar (GUI)
Legacy shipped only Thunar (and a stray nautilus extension, mid-migration).
This pairs a keyboard-driven TUI flagship that fits the distro's identity
with the GUI half for point-and-click + the "open folder" handler.

yazi (modules/home/yazi.nix, nomarchy.yazi.enable, SUPER+E, `y` shell
wrapper cd's on exit): themed from theme-state.json (mgr/mode/status
mapped from the palette; merges over yazi's defaults so it tracks the
theme) with a curated, correctly-wired plugin set —
  full-border, git (setup + prepend_fetchers), smart-enter (l/Enter),
  chmod (cm), mount (M), compress (caa), mediainfo (audio/subtitle only —
  images/videos keep native thumbnails), glow (markdown previews).
Preview/tooling deps: ffmpegthumbnailer, poppler-utils, p7zip, jq, fd,
ripgrep, fzf, chafa, mediainfo, glow.

Thunar (modules/nixos/file-manager.nix, nomarchy.system.fileManager.enable):
GTK file manager (Stylix-themed) + archive/volman/media-tags plugins +
gvfs/tumbler/udisks2 backends + thumbnailers + exo. udisks2 also backs
yazi's mount plugin.

Verified: flake check green, HM generation builds (yazi TOML/init.lua
render, all 8 plugins resolve), every package present in the live ISO
closure (offline install draws from it — no source-build leak).
Not verified: yazi's runtime preview/plugin behaviour needs a real
session (TUI; can't drive in CI here).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 14:32:11 +01:00
Bernardo Magri
d06373b155 feat(home): mkDefault behaviour settings so downstream can plain-override
Nomarchy's Hyprland/Ghostty/Waybar settings were set at normal priority,
so a downstream `home.nix` setting any value Nomarchy already set threw a
"conflicting definition values" error — overriding required lib.mkForce,
contradicting the README's "mkDefault throughout" claim.

Now: behaviour/chrome leaves (input, misc, monitor, animations, dwindle,
gesture, decoration.blur sizing, ghostty padding/decoration, waybar
settings+style) are lib.mkDefault — a plain home.nix assignment wins.
Appearance values that flow from theme-state.json (gaps, colors,
rounding, opacity, fonts) stay at normal priority on purpose: change them
via nomarchy-theme-sync (their source of truth) or lib.mkForce to
hardcode. bind/exec-once lists stay normal priority so additions
concatenate rather than replace.

Verified: behaviour/ghostty plain overrides build; theme values still
conflict (steering to the CLI); default rendered config is byte-identical.

New docs/OVERRIDES.md with the appearance→CLI / behaviour→home.nix /
component→toggle model and worked examples; linked from the README.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 14:05:59 +01:00
Bernardo Magri
bd42462291 fix(home): power menu on SUPER+X, not SUPER+Escape
Super+Escape didn't fire on real hardware (Latitude 5410) while its
neighbour binds did — the chord gets swallowed before reaching
Hyprland's dispatcher on some setups. SUPER+X is unambiguous.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 13:44:22 +01:00
Bernardo Magri
583708d78c docs: README for the v1 QA batch (menu, swaync, idle, Plymouth, sys-update)
Options/keybinds/layout tables, sys-update/home-update workflow, the new
module tree, and roadmap updates (menu system + nm-applet shipped; theme
parity, branding round 2, swayosd, ask-Claude module remain).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 07:38:31 +01:00
Bernardo Magri
6763bef73e fix(install): pre-activation, writable home.nix, keyboard/locale selection
- Pre-activation failure ("desktop pre-activation failed"): the in-chroot
  HM build hard-coded `--option substituters ""`, which only works on
  OFFLINE installs (where the ISO store is copied in). Online installs
  (now common — wifi works) had no pins and built from source. Fix: build
  the generation in the live env (its store always has the pins), nix copy
  the closure to the target, chroot only activates. In-chroot build kept
  as fallback. Uses path: (not git+file:) to sidestep libgit2 ownership.
- Read-only home.nix: templates come out of the store mode 0444 and cp
  preserves it — chmod -R u+w after staging so the user can edit it.
- Keyboard + locale selection: gum prompts (localectl layouts/variants +
  curated UTF-8 locale list) and NOMARCHY_LOCALE/KB_LAYOUT/KB_VARIANT for
  unattended. One choice flows everywhere — services.xserver.xkb (source
  of truth) + console.useXkbConfig (tty/greeter) + boot.initrd.systemd
  (so the LUKS passphrase prompt uses the layout; script initrd can't) +
  the generated home.nix's nomarchy.keyboard.* for the Hyprland session.
- test-install.sh: NOMARCHY_OVMF env override for sandboxed OVMF paths.

Verified end-to-end in QEMU: offline LUKS install completes, boots to a
themed desktop (no autogenerated-config banner), Plymouth renders the LUKS
prompt on the theme-tinted background.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 07:38:31 +01:00
Bernardo Magri
465f013155 feat(home): menu system, swaync, idle/lock, nm-applet, theme parity
- Themed fuzzel (modules/home/fuzzel.nix): palette/fonts/border from the
  JSON, themes/<slug>/fuzzel.ini whole-swap mechanism. Plus the
  nomarchy-menu dispatcher: root picker · power (SUPER+Escape) · theme
  (SUPER+T) · clipboard (SUPER+CTRL+V, cliphist) · calc (qalc) · files
  (fd→xdg-open) · web (DuckDuckGo).
- swaync notifications themed from the JSON (SUPER+N) — until now nothing
  rendered notify-send (theme toasts, font warnings, welcome msg).
- hyprlock + hypridle (modules/home/idle.nix): lock 5min, dpms off 10,
  suspend 30; enables the power menu's Lock entry. cliphist daemon on.
- NetworkManager applet in waybar's tray (preferStatusNotifierItems);
  network module on-click → $TERMINAL -e nmtui.
- nomarchy.keyboard.layout/.variant option → Hyprland kb_layout/kb_variant
  (the installer writes it; pairs with system-side xkb for tty/LUKS).
- Media-key/audio on-click moved to wpctl (pamixer was inconsistent).
- Theme parity: summer-day/night carry their legacy bar LAYOUTS as
  waybar.jsonc whole-swaps (the original import took waybar.css but not
  config.jsonc, so identity themes styled nonexistent modules). Dead
  legacy script-modules dropped, Nerd-Fonts-v2 codepoints → FontAwesome/v3
  (font-awesome now shipped), logo buttons open nomarchy-menu.

New toggles: nomarchy.{fuzzel,swaync,idle}.enable (all default true).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 07:37:47 +01:00
Bernardo Magri
eda8461304 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>
2026-06-13 07:37:32 +01:00
Bernardo Magri
1ba1eeed64 fix(live): re-enable fontconfig + xdg integration the minimal-CD profile strips
installation-cd-minimal forces fonts.fontconfig.enable = false
(mkOverride 500) to slim a console-only installer — but this ISO is the
desktop. Without fontconfig no family resolves: Waybar's nf-md icons
rendered as tofu boxes and Ghostty silently fell back to the wrong
font (reported on the Latitude 5410, reproduced + fix verified in QEMU
via VNC screenshots: icons render, fc-match resolves JetBrainsMono
Nerd Font). Also restore xdg icons/mime/autostart and man pages.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 20:23:28 +01:00
Bernardo Magri
c1781f45ca feat: allow unfree packages distro-wide
nixpkgs.config.allowUnfree in the system module (covers the live ISO
via useGlobalPkgs and every mkFlake machine) plus the two explicit
`import nixpkgs` sites (repo + lib.nix) so the standalone HM desktop
sees the same package set. Unblocks claude-code for the menu system's
ask-Claude module, vendor drivers, etc. Opt out with
`nixpkgs.config = lib.mkForce { allowUnfree = false; }`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 18:16:20 +01:00
Bernardo Magri
ed7be0206d docs: roadmap — menu script modules: calc, clipboard, files, web, ask-Claude
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 18:11:28 +01:00
Bernardo Magri
009bdbad8f docs: roadmap — menu system design: fuzzel dmenu dispatcher, themed from the JSON
Resolves the old Walker/Lua previews-vs-simplicity question in favor of
fuzzel: already shipped, nested menus via dmenu mode, INI theme bakeable
from theme-state.json like every other app.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 18:03:58 +01:00
Bernardo Magri
a33127cd3c docs: roadmap — Nomarchy distro branding (os-release, ISO boot menu, splash)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 17:59:52 +01:00
Bernardo Magri
dccceb4c48 fix: real-hardware QA sweep — wifi, fonts, firmware, Hyprland 0.55, offline switching
Roadmap items 1+2 plus the issues found testing on a Latitude 5410:

- Ship the 10 most popular Nerd Fonts by default (iosevka swapped for
  mononoki: 1.1 GB vs 27 MB) and warn from nomarchy-theme-sync when a
  configured fonts.mono/fonts.ui family isn't installed (fc-match) —
  fontconfig substitutes silently otherwise.
- hardware.enableRedistributableFirmware: installed systems shipped NO
  firmware blobs (wifi/SOF audio/BT) — nixos-generate-config only emits
  microcode lines referencing this flag, it never sets it.
- Live ISO wifi: networking.wireless.enable = mkForce false killed
  NetworkManager's supplicant — since 26.05 the NM module drives its
  wifi backend THROUGH networking.wireless (dbusControlled). Devices
  vanished from nmtui with iwlwifi loaded and no rfkill block.
- Hyprland 0.55: launch sessions via start-hyprland (watchdog; bare
  binary warns), add the new gesture keyword (workspace_swipe is gone —
  touchpads had no gestures at all), media keys via wpctl/bindel/bindl
  plus the missing mic/play/next/prev binds.
- Offline theme switching: pin mustache-go + stdenv + the repo's own
  standalone HM generation (incl. home-files inputDerivation) into the
  ISO — stylix re-renders base16 templates per switch and an offline
  `apply` cascaded into building stdenv from source (1107 drvs).
  Verified with tools/vm/gap-analysis.py: 17 config drvs, zero fetches.
- Stylix: track release-26.05 (kills the HM version-skew warning and
  the stale home-manager follows), lock updated.
- Roadmap: swaync (no notification daemon ships today).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 17:50:55 +01:00
bc5faec6b8 Update README.md 2026-06-12 14:05:10 +01:00
Bernardo Magri
77a0e70146 Nomarchy v1: the NixOS 26.05 ground-up rewrite replaces the legacy distro
main now carries the new distro (theme-state.json engine, mkFlake
downstream API, nomarchy-install with verified offline installs). The
old distro's history stays reachable here and lives on as the `legacy`
branch. Tree is identical to refactor/v1 @ 37819bb.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 13:14:44 +01:00
Bernardo Magri
37819bb50f feat: v1 release branch — generated flakes and template track ?ref=v1
Installed machines and the downstream template now resolve nomarchy from
git+https://git.bemagri.xyz/bernardo/nomarchy.git?ref=v1 (the lock's
original node carries the ref too), so `nix flake update` follows the
release branch instead of the forge's default branch. README quickstart
points at the real forge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 09:50:09 +01:00
Bernardo Magri
a50e9793ea feat(tools): commit the VM test harness + one-command installer regression
Promotes the throwaway harness that verified the installer into tools/:
- tools/vm/qmp.py        QMP keystroke injection / typing / quit
- tools/vm/vncshot.py    GL-safe screenshots via VNC readback (QMP
                         screendump shows "no surface" with virtio-vga-gl)
- tools/vm/gap-analysis.py  drv-graph diff that converged the offline
                         pin set; run it when offline installs build
                         from source
- tools/test-install.sh  the full offline regression: build ISO, boot
                         offline, unattended LUKS+swap install via a
                         config disk (typed long commands drop keys),
                         wait for poweroff, boot the installed disk,
                         screenshot the first boot for visual verdict

docs/TESTING.md §4 now points at the script.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 08:05:13 +01:00
Bernardo Magri
7b5a22c800 fix(install): run a nix-daemon for the chroot HM activation + backup collisions
The pre-activation log (now persisted) showed activate dying at its
profile operation: as the target user with no daemon in the chroot,
nix can't open the store db ("big-lock: Permission denied"). Run a
temporary nix-daemon inside the chroot and point activate at it via
NIX_REMOTE=daemon. HOME_MANAGER_BACKUP_EXT=bak makes file collisions
(e.g. a stray autogenerated hyprland.conf) move aside instead of
aborting. Verified in the chroot on a real installed disk: HM symlinks
land, collision backed up.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 21:51:28 +01:00
Bernardo Magri
134695806c fix(install): stage the pre-activation script in /root — nixos-enter tmpfs-mounts /tmp
The HM pre-activation never ran: the script was written to /mnt/tmp and
nixos-enter mounts a fresh tmpfs over /tmp inside the chroot, so `bash
/tmp/...` found nothing and the best-effort guard swallowed it. Verified
interactively that every inner step (path: build as root, runuser leg)
works in the chroot — only the staging path was broken. Now staged in
/root, with set -x logging persisted to /var/log/nomarchy-hm-preactivate.log
on the target and the tail echoed into the install transcript on failure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 20:53:21 +01:00
Bernardo Magri
727f21005d fix(install): root-side flake refs must be path:, not git+file
The chown fix made the flake user-owned, and root's libgit2 then refuses
git+file fetches of it ("not owned by current user") — which silently
killed the seeding step under set -e and would equally break
nixos-install --flake. Use path: refs for the live-side archive and the
nixos-install invocation (path flakes read flake.lock, skip libgit2),
and make seeding failure non-fatal as intended.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 19:39:09 +01:00
Bernardo Magri
1403ea82b2 fix(install): chown the generated flake to the user; harden HM pre-activation
End-to-end VM verification found the installed system perfect (LUKS,
auto-login, swapfile+resume, snapper) except: ~/.nomarchy was root-owned,
so libgit2 refused every `home-manager switch` ("repository not owned by
current user"). chown 1000:users after generation (the account doesn't
exist in the target yet — numeric ids).

The chroot pre-activation now builds via path: instead of git+file —
no libgit2, no ownership sensitivity — and the fallback message suggests
-b bak (a default-config Hyprland session leaves an autogenerated
hyprland.conf in the way otherwise; observed live).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 11:17:38 +01:00
Bernardo Magri
29818d2fb6 fix(install): offline installs copy the ISO store into the target up front
Substituter plumbing through nixos-install proved unreliable (env config
is overridden by its hardcoded flags; the forwarded --substituters flag
still left the plan building gcc from source). Make every ISO path valid
in the target store with one nix copy --all before nixos-install — the
in-target build then resolves everything locally and only the per-machine
config drvs are built.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 10:01:49 +01:00
Bernardo Magri
77dba7ca5d fix(install): pass --substituters through nixos-install, not just the env
nixos-install hardcodes --extra-substituters "auto?trusted=1" as a CLI
flag, and flags override NIX_CONFIG for the same setting — so the env
fix never reached the in-target build. nixos-install forwards a
--substituters flag verbatim; use that.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 09:24:00 +01:00
Bernardo Magri
dba349a539 fix(install): substitute from the live daemon store during the target build
nixos-install builds with --store /mnt and passes its own substituter as
"auto?trusted=1", which in that context resolves to the target store
itself — so nothing flowed from the ISO and nix fell back to a
full-source bootstrap (gcc/python/bash tarball fetches → offline death).
Host-store simulation (fresh local?root, substituters cleared) proves
"daemon?trusted=1" makes the whole install substitute + build offline:
1125 paths copied, only the per-machine config drvs built locally.

Also drop --offline from the chroot HM build (that flag disables ALL
substituters; plain empty substituters does what we want without it).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 08:51:30 +01:00
Bernardo Magri
3b0b2872aa fix(install): seed target store via nix copy --no-check-sigs
`nix flake archive --to` rejects locally-evaluated source paths ("lacks
a signature by a trusted key"); enumerate the archive tree as JSON and
copy with --no-check-sigs instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 08:02:52 +01:00
Bernardo Magri
804d708f87 fix(install): pin the common nixos-hardware profile stacks into the ISO
Round 7 in-VM: autodetection emitted common-cpu-intel, whose nixos-hardware
module pulls the whole Intel graphics stack (intel-media-driver,
compute-runtime, libva, level-zero…) — none of it on the ISO, so the
offline install built graphics drivers from source. The representative
pin now imports the common-* profiles (intel+amd cpu/gpu, laptop, ssd,
pc), covering what the detector emits on ordinary machines.
Model-specific profiles may still need network.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 07:59:02 +01:00
Bernardo Magri
8da429d611 fix(install): converge the offline pin set via derivation-graph gap analysis
Walking the install-shaped toplevel's drv graph against the ISO's actual
path set (tools/gap analysis) found why offline installs kept building
from source:

- system-path is rebuilt on EVERY machine: buildEnv's package-list order
  follows module-graph order, which any hardware profile reshuffles →
  pin its builders (texinfo, getconf)
- greetd.toml embeds the auto-login user and is generated by remarshal;
  building remarshal offline drags its test closure (matplotlib → ffmpeg
  → x265…, ~1900 drvs) → pin pkgs.remarshal
- second-level tools for the always-rebuilt drvs: kmod.dev +
  nukeReferences (modules-shrunk), xorg.lndir (unit dirs), libxslt.bin
  (dbus config), python3Minimal (etc)
- the representative pin now has a vfat /boot like a real install
  (mtools/dosfstools enter systemPackages via the vfat fs-type gate)

Verified on the host: the remaining offline build set for a foreign
username/hostname/UUID config is 66 trivial config drvs + eval-time file
copies from the pinned nixpkgs tree — zero network. Same check for the
per-username HM activation: 15 drvs, offline-clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 22:36:46 +01:00
Bernardo Magri
996fdc28c9 revert(install): includeBuildDependencies was a 134 GB hammer
The full system build closure adds ~134 GB to the store and would have
produced an unusable multi-ten-GB ISO. Back to targeted inputDerivation
pins; the still-missing second-level build tools get pinned explicitly
next, from a clean committed-tree gap analysis.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 22:09:22 +01:00
Bernardo Magri
609bb7e7dc fix(install): carry the full system build closure on the ISO
Round 6 still hit a from-source cascade: every per-machine drv (units,
initrd pieces, dbus config, modules-shrunk) needs its own build tools
(lndir, builder.pl, kmod-dev, nuke-refs, libxslt-bin, …), one level
deeper than targeted inputDerivation pins reach. Use the documented
mechanism instead: system.includeBuildDependencies = true on the
representative install pin. Bigger ISO, networkless installs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 19:41:37 +01:00
Bernardo Magri
ecf94e84ab fix(install): pin build-time deps of per-install drvs; no substituters offline
Offline nixos-install still built from source: the drvs that embed the
user's hostname/username/UUIDs (etc, initrd, toplevel, HM activation)
must be REBUILT, and their builders need tools outside every runtime
closure (etc → python3-minimal, initrd → packing tools). Pin each drv's
inputDerivation into the ISO — the standard nixos-test offline trick.

Also: with no network every substituter query is a DNS retry storm that
ends in a nix goal.cc assertion crash (core dump observed); the installer
now probes connectivity and disables substituters when offline, both on
the live system and inside the nixos-enter HM pre-activation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 19:05:17 +01:00
Bernardo Magri
c813055578 fix(install): pin the install-shaped system into the ISO, not the bare template
The offline nixos-install failed building from source: the generated
config enables snapper/auto-login/LUKS-initrd/swapfile-resume on a BTRFS
root, none of which the bare template (ext4 placeholder!) pulls in — so
snapper, nixos-rebuild-snap, btrfs-progs-lib and cryptsetup-bin were
absent from the ISO. The pinned system now mirrors the installer's output
(closure-diff verified).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 18:33:15 +01:00
Bernardo Magri
8881ad3bae fix(install): rewrite follows paths when grafting the upstream lock
Lock follows paths are absolute from the root node; nomarchy's nodes move
one level down in the composed downstream lock, so ["nixpkgs"] must
become ["nomarchy","nixpkgs"] — otherwise every follows dangles
("input 'nomarchy/home-manager/nixpkgs' follows a non-existent input").
Verified: the composed lock now resolves the full input tree with
`nix flake metadata --offline`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 17:53:11 +01:00
Bernardo Magri
7aba5fa0a8 fix(install): pin a representative disko script into the ISO closure
disko builds its format/mount script at install time; offline, the
script's tool closure (file, which, wrapper hooks) wasn't on the ISO and
nix tried to build it from source — which needs the network. Pre-building
one representative script (luks + swap variant) pins every input; the
user's actual invocation then differs only in the final text-generation
derivation, which builds offline in seconds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 17:09:08 +01:00
Bernardo Magri
479193b10b fix(install): survive the live ISO offline and its non-interactive bash
Found by running the unattended install in an offline QEMU VM:
- compgen is missing from nixpkgs' non-interactive bash (the package
  shebang) — replaced with plain glob tests in hardware-db and prewipe
- disko's eval resolves <nixpkgs> via NIX_PATH (a dead channel on the
  ISO) and tried channels.nixos.org — export NIX_PATH to the pinned
  nixpkgs source and point the flake registry at an empty baked file
- lock nomarchy by path (the source the ISO carries) instead of
  git+https: git inputs clone even when narHash is known, which kills
  offline installs; `original` keeps the forge URL so a later
  `nix flake update` re-resolves normally. Works from dirty-tree ISOs too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 16:48:33 +01:00
Bernardo Magri
71614fa6ca feat(install): LUKS by default → auto-login, snapper snapshots, hibernation swapfile
- LUKS2 is the installer default; in exchange the generated config sets
  the new nomarchy.system.greeter.autoLogin (greetd initial_session) —
  the disk passphrase already gates the machine.
- @snapshots subvolume + nomarchy.system.snapper.enable: hourly/daily
  timeline snapshots of / and the nixos-rebuild-snap helper, ported from
  the previous iteration (3bdfc35), guarded to no-op on non-BTRFS roots.
- @swap subvolume with a swapfile sized to RAM by default (disko
  mkswapfile handles NOCOW); the installer computes the resume offset
  and wires boot.resumeDevice + resume_offset for hibernation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 16:19:14 +01:00
Bernardo Magri
f3707357a6 feat: nomarchy-install — guided live-ISO installer (disko + mkFlake)
Ported from the previous iteration's installer (3bdfc35), adapted to the
mkFlake world. gum TUI: disk pick, optional LUKS2, user/hostname/timezone,
DMI → nixos-hardware autodetection (hardware-db.sh). disko partitions
GPT + 1 GiB ESP + BTRFS subvolumes; the generated machine flake lands at
~user/.nomarchy (one mkFlake call, /etc/nixos symlinks to it) and
nixos-install makes it bootable (UEFI/systemd-boot, v1 single disk).

Offline by construction: the target flake.lock is composed from the rev
the ISO was built from (compose-lock.py), `nix flake archive` seeds the
target store, and the ISO pre-builds the template system + desktop.
First boot lands themed: the HM generation is pre-activated in chroot.

mkFlake grows two things for this: hardwareProfile now also takes a list
(autodetection emits several common-* modules), and installed systems get
the standalone home-manager CLI from the pinned input. Unattended mode
(NOMARCHY_UNATTENDED=1 + env) documented in docs/TESTING.md §4.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 16:05:29 +01:00
Bernardo Magri
8ded92ea63 chore: drop renamed package aliases (swww→awww, greetd.tuigreet→tuigreet)
Silences nixpkgs' rename warnings on every eval.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 15:43:16 +01:00
Bernardo Magri
1f22e996dc feat: nomarchy.lib.mkFlake — one-call downstream wrapper + hardware profiles
Downstream users now own only system.nix and home.nix; their flake.nix is
generated once from the template and never hand-edited. mkFlake (lib.nix)
wires both layers and maps hardwareProfile = "<name>" to nixos-hardware
modules (new input, pinned here, nixpkgs follows ours; unknown names fail
with did-you-mean suggestions). Flake checks evaluate the template through
mkFlake — including a real profile — so drift fails `nix flake check`.

Also from the live-VM testing session: install the home-manager CLI in the
live ISO and pin flake inputs transitively (offline theme switching needs
stylix's own inputs too), plus swww→awww doc updates.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 15:39:21 +01:00
Bernardo Magri
8a0ec763e0 fix: live-VM desktop fixes — Hyprland 0.55 compat + swww→awww rename
Found by booting the live ISO (docs/TESTING.md checklist):
- pin HM configType = "hyprlang" (26.05 stateVersion defaults to the new
  Lua config and renders these settings as broken hl.$mod(...) calls,
  booting Hyprland into emergency mode)
- drop dwindle:pseudotile (removed in Hyprland 0.55; aborts config parse)
- disable splash rendering alongside the logo
- launch awww-daemon and call awww with swww fallback (nixpkgs' swww is
  the renamed awww fork; no `swww` binary exists anymore)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 15:38:32 +01:00
Bernardo Magri
f211ef0d09 feat: Nomarchy ground-up rewrite on NixOS 26.05
Full replacement of the previous iteration, rebuilt around three ideas:

- Pure evaluation: theme-state.json lives inside the flake and is read
  via the nomarchy.stateFile option — no --impure, ever.
- All-Home-Manager theming: `nomarchy-theme-sync apply` writes the JSON
  and runs `home-manager switch`; every theme change is one atomic,
  rollbackable generation. Wallpaper (swww) is the sole runtime piece.
- Flat, downstream-first layout: modules/{nixos,home} with one
  options.nix each, exported as nixosModules/homeModules + overlay +
  flake template; system (nixos-rebuild) and desktop (home-manager
  switch) rebuild paths are fully split.

Ships 21 themes imported from the previous iteration (palettes,
wallpapers, btop themes, six whole-swap Waybar identities), Stylix for
the GTK/Qt/cursor long tail, a live ISO target with offline theme
switching, and docs/TESTING.md with the QEMU verification workflow.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 10:59:13 +01:00
Bernardo Magri
83218a01f3 docs: add "Working on Nomarchy" orientation guide
Some checks failed
Check / eval-and-lint (push) Failing after 6m21s
A short, task-indexed guide for navigating the repo: the core/features/themes
mental model, the two app-config namespaces, the four script locations (incl.
themes/engine/scripts/), the build/test loop, how theming works, and a
Walker+elephant deep-dive covering the dmenu vs custom-provider menu paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 13:32:24 +01:00
Bernardo Magri
9fe6d9e405 fix(walker): don't spawn a duplicate elephant alongside the service
nomarchy-launch-walker guarded its manual elephant start with
`pgrep -x elephant`, which never matches the Home Manager service's actual
process name `.elephant-wrapped` (Linux truncates comm to 15 chars). So every
menu invocation spawned a second elephant that races elephant.service for the
socket — a latent source of menus intermittently coming up empty.

Gate on `systemctl --user is-active elephant.service` first, with a working
`pgrep -f elephant-wrapped` fallback for non-service setups; do the same for
walker.service. Verified in a headless system.build.vm: opening the theme menu
now keeps the elephant process count at 1 (was 2) and the menu still renders.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 13:32:12 +01:00
Bernardo Magri
8a302e8771 chore: drop omarchy pkg-* compatibility shims
Some checks failed
Check / eval-and-lint (push) Failing after 6m15s
These existed only to ease muscle-memory from Arch-based distros and add
no behavior on a Nix-native system:

- nomarchy-pkg-install — alias for nomarchy-pkg-add
- nomarchy-pkg-drop    — alias for nomarchy-pkg-remove
- nomarchy-pkg-aur-add — stub that only printed "AUR doesn't exist on NixOS"

The single code caller (nomarchy-voxtype-remove) was removed in the prior
commit, so the shims have no remaining references. SKILL.md updated to use
nomarchy-pkg-add and to point at `nix search nixpkgs` instead of the AUR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 19:52:19 +01:00
Bernardo Magri
698d8593cd feat: remove unused voxtype dictation feature
Voxtype voice-typing was a full feature (5 scripts, a waybar widget, a
keybind, and a NixOS option) that this install does not use. The
nomarchy.system.voxtype option had no consumer — nothing read it — so the
widget and SUPER+CTRL+X bind were never actually gated by it.

Removes the scripts, default config, the SUPER+CTRL+X bind, the waybar
module (main + summer-night theme + css), the dead option, the installer
comment, and the docs. SCRIPTS.md/KEYBINDINGS.md regenerated; OPTIONS.md
and SKILL.md hand-updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 19:51:46 +01:00
Bernardo Magri
4b509c271a fix(scripts): remove stale duplicate nomarchy-update
Some checks failed
Check / eval-and-lint (push) Failing after 6m14s
Two scripts named nomarchy-update shipped from different derivations
(core/system/scripts + features/scripts/utils), both landing on PATH so
which one ran depended on PATH ordering. The core/system one never stripped
the install-time `?rev=` pin and rebuilt a nonexistent `#default` attr,
silently keeping installs frozen instead of following rolling main. Keep the
features/scripts/utils version (unpins, queries upstream HEAD, calls
nomarchy-sys-update) and drop the stale one. Regenerated docs/SCRIPTS.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 20:55:04 +01:00
Bernardo Magri
2bdcc0aba0 fix(live): enable VM guest agents so Hyprland boots at full resolution
The nomarchy-live ISO imported ./core and hosts/nomarchy-live.nix but not
core/system/vm-guest.nix, which is the only place spice-vdagentd/qemuGuest
were enabled. Without those agents a VM's virtio-gpu only advertises its
1024x768 fallback mode, so Hyprland's `monitor = , highres, auto` rule picks
that as the highest mode and the live session boots tiny.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 20:55:04 +01:00
Bernardo Magri
27821c270f fix(impermanence): mark /persist and /home neededForBoot
Some checks failed
Check / eval-and-lint (push) Failing after 5m56s
The impermanence module asserts that the persistent-storage volume and
every volume it bind-mounts into are available in early boot. Persisted
user dirs land under /home, so both /persist and the @home subvolume
must have neededForBoot = true. disko and nixos-generate-config leave it
at the default (false), so a fresh install with impermanence enabled
aborted with:

    All filesystems used for persistent storage must have the option
    "neededForBoot" set to true.
    Please fix the following filesystems: /persist /home

Declare neededForBoot in the module that imposes the requirement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 19:34:04 +01:00
Bernardo Magri
a84e903ae1 fix(live): allow empty-password hyprlock unlock on live ISO
pam_unix rejects empty passwords by default, so if hypridle locked the
live session there was nothing the user could type to unlock it. Set
allowNullPassword on the hyprlock PAM service so a bare Enter dismisses
the locker, matching the empty live account passwords. Scoped to the
live host so installed systems still reject empty unlocks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 19:24:42 +01:00
Bernardo Magri
5ea369d73c fix(installer): declare extra LUKS devices for multi-disk boot
All checks were successful
Check / eval-and-lint (push) Successful in 6m51s
A multi-disk install builds one LUKS container per drive joined into a
single multi-device BTRFS (-d single -m raid1). nixos-generate-config
only emits boot.initrd.luks.devices for the main drive — every subvolume
mounts through /dev/mapper/crypted_main, so the other members are
invisible to it. The installed system then unlocked only the main drive,
the array never assembled, and boot hung. Invisible single-disk, fatal
multi-disk (matches a real-hardware report).

generate_flake_config now writes, into hardware-selection.nix, a
boot.initrd.luks.devices entry for each extra drive (UUID resolved via
disko's partlabel; mapper name mirrors disko-config.nix's sanitize) and
re-asserts the x-systemd.requires= mount options disko sets but which
nixos-generate-config strips.

Verified end-to-end in a 3-disk UEFI QEMU VM: reproduced the bug, applied
the fix, ran a real nixos-install onto the array, and rebooted from the
disks — one passphrase unlocked all three containers, the 3-device BTRFS
assembled, and the system reached login.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 18:50:10 +01:00
Bernardo Magri
fdd74a0e4f fix(installer): resolve /etc/nomarchy symlink before getFlake
`generate_state` loads `nixpkgs.lib` for the state-schema eval via
`builtins.getFlake "$NOMARCHY_REPO"`. On the live ISO that path is a
symlink chain (/etc/nomarchy -> /etc/static/nomarchy -> /nix/store/…-source),
and Nix 2.31+ rejects getFlake on a symlink ("path '…-source' is a
symlink"), aborting every real-hardware install right after hardware
config generation — single or multi disk.

Resolve the repo to its real store directory with `realpath` at
detection so getFlake receives a plain directory. The dev-checkout
branch already used realpath, so only the live-ISO path was affected.
Reproduced and fixed in a live VM (Nix 2.31.4).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 18:49:43 +01:00
Bernardo Magri
431dd98967 feat(theme): implement declarative Stylix-driven theming for Walker
All checks were successful
Check / eval-and-lint (push) Successful in 6m58s
2026-06-01 21:09:54 +01:00
Bernardo Magri
fa71e03f88 docs: move remaining Ironclad verifications to Shipped
All checks were successful
Check / eval-and-lint (push) Successful in 6m45s
2026-06-01 21:00:09 +01:00
Bernardo Magri
e3002d49ad fix(waybar): ensure update module is visible in summer-night theme
All checks were successful
Check / eval-and-lint (push) Successful in 6m37s
2026-06-01 20:36:04 +01:00
Bernardo Magri
dc7a3e2a29 feat(update): add interactive confirmation prompt to nomarchy-update and expose in all themes
Some checks failed
Check / eval-and-lint (push) Has been cancelled
2026-06-01 20:35:06 +01:00
Bernardo Magri
dd72110b9a docs: finalize roadmap entries for flake updates and offline resilience
All checks were successful
Check / eval-and-lint (push) Successful in 6m43s
2026-06-01 20:27:25 +01:00
Bernardo Magri
1e6becd42d fix(scripts): improve offline resilience and restore missing update scripts
All checks were successful
Check / eval-and-lint (push) Successful in 7m5s
2026-06-01 20:07:08 +01:00
Bernardo Magri
6ed2ca3d78 fix(scripts): resolve race condition in state-sync and mark stress test as complete
All checks were successful
Check / eval-and-lint (push) Successful in 7m9s
2026-06-01 18:48:17 +01:00
Bernardo Magri
d242d1ea88 fix(waybar): reconcile tooltips with keybindings and fix stale references
Some checks failed
Check / eval-and-lint (push) Failing after 1m52s
2026-05-31 21:59:08 +01:00
Bernardo Magri
3a0164feb7 docs: mark Round 2 Interactive Script Audit as complete
All checks were successful
Check / eval-and-lint (push) Successful in 6m43s
2026-05-31 21:45:41 +01:00
Bernardo Magri
8dc6ba0a21 docs: mark App Integration Polish as complete
All checks were successful
Check / eval-and-lint (push) Successful in 6m38s
2026-05-31 20:59:26 +01:00
Bernardo Magri
5d558a3cc6 fix(system): enable Polkit for Thunar drive management
Some checks failed
Check / eval-and-lint (push) Has been cancelled
2026-05-31 20:59:04 +01:00
Bernardo Magri
ea34a7ac1f fix(apps): improve Thunar and Mako integration
Some checks failed
Check / eval-and-lint (push) Has been cancelled
2026-05-31 20:58:10 +01:00
Bernardo Magri
878c11bd41 docs: add RUNTIME_HOOKS.md and link from README
All checks were successful
Check / eval-and-lint (push) Successful in 6m35s
2026-05-31 20:35:58 +01:00
Bernardo Magri
3a42b664a1 feat: wire up post-update and post-install hooks
Some checks failed
Check / eval-and-lint (push) Has been cancelled
2026-05-31 20:34:01 +01:00
Bernardo Magri
1301873bc0 docs: finalize declarative-state migration in roadmap
Some checks failed
Check / eval-and-lint (push) Failing after 6m45s
2026-05-31 20:09:31 +01:00
Bernardo Magri
dc3346bc55 feat: implement hybrid declarative state with automatic Nix sync
Some checks failed
Check / eval-and-lint (push) Has been cancelled
2026-05-31 20:09:12 +01:00
Bernardo Magri
624023c1d5 docs: move declarative-state migration batch 1 and monitor scaling to Shipped
Some checks failed
Check / eval-and-lint (push) Failing after 6m42s
2026-05-31 19:33:57 +01:00
Bernardo Magri
130ae80f3e feat: migrate theme and font to declarative Nix options
Some checks failed
Check / eval-and-lint (push) Has been cancelled
2026-05-31 19:33:33 +01:00
Bernardo Magri
a2649728d3 feat(hyprland): implement declarative monitor scaling and add scale picker to welcome wizard
Some checks failed
Check / eval-and-lint (push) Failing after 6m36s
2026-05-31 19:21:52 +01:00
Bernardo Magri
8911ffa4e8 feat(calendar): ship calcurse and wire waybar clock clicks
Some checks failed
Check / eval-and-lint (push) Failing after 6m22s
2026-05-31 16:43:47 +01:00
Bernardo Magri
395c839ed0 fix(waybar): retarget broken clicks in summer-day/night themes to nomarchy scripts
Some checks failed
Check / eval-and-lint (push) Has been cancelled
2026-05-31 16:42:31 +01:00
Bernardo Magri
a9cc39f3fe fix(input-method): update fcitx5-chinese-addons to kdePackages.fcitx5-chinese-addons
All checks were successful
Check / eval-and-lint (push) Successful in 6m51s
2026-05-31 16:12:17 +01:00
Bernardo Magri
e6b7269b3c feat: move core apps to downstream and make app modules opt-in
All checks were successful
Check / eval-and-lint (push) Successful in 6m39s
2026-05-31 15:44:50 +01:00
Bernardo Magri
51a0f920be docs: mark Pillar 9 Component 6 graphical pass as complete 2026-05-31 15:35:30 +01:00
Bernardo Magri
2c86074893 fix(waybar): drop the dead summer-night date on-click (kitty calcurse)
All checks were successful
Check / eval-and-lint (push) Successful in 6m51s
The default theme's clock#date wired on-click to `kitty calcurse`, but
kitty isn't a default-installed app (alacritty is the terminal) and
calcurse isn't installed anywhere — so clicking the date did nothing.
The default config.jsonc uses xdg-terminal-exec/alacritty for its
clicks and summer-day's date has no on-click. Drop the dead action
(tooltip: false), matching summer-day.

Found during the Pillar 9 Component 6 (apps) pass, which confirmed
btop/ghostty/kitty/lazygit/tmux ship config-only by design (the
installer/user picks the binary) — not a bug. Logged two follow-ups:
summer-day's wofi --term=kitty launcher, and shipping a calendar app.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 15:16:39 +01:00
Bernardo Magri
43b0cbcd65 fix(waybar): show the battery widget on the default summer-night theme
All checks were successful
Check / eval-and-lint (push) Successful in 6m46s
The summer-night waybar config defined a custom/battery module
(exec nomarchy-battery-status) but never listed it in any modules-*
slot, so it was orphaned and never rendered. summer-night is the
default theme, so a laptop on a stock install had no battery
indicator — the default fallback config and the summer-day theme
both place battery in modules-right; only summer-night omitted it.

Add custom/battery to summer-night's modules-right. The formFactor
filter (laptopOnlyModules) already lists custom/battery, so it shows
on laptop and is dropped on desktop. Found during the Pillar 9
Component 9 (form-factor split) verification pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 15:03:49 +01:00
Bernardo Magri
3d931a6455 fix(menu): repair three dead nomarchy-menu leaf actions (Pillar 9 / Component 3)
All checks were successful
Check / eval-and-lint (push) Successful in 6m41s
Found by driving the menu's observable actions live in a VM with the real
session env imported. All three are also bound to keybindings.

1. nomarchy-hyprland-window-single-square-aspect-toggle (1-Window Ratio,
   SUPER CTRL BACKSPACE): read/set layout:single_window_aspect_ratio, which
   is "no such option" in Hyprland 0.52.1 — the option lives under dwindle:.
   The getoption returned nothing and the keyword set was silently dropped,
   so the toggle did nothing. Point it at dwindle:single_window_aspect_ratio.

2. nomarchy-hyprland-workspace-layout-toggle (Workspace Layout, SUPER L):
   read .tiledLayout off `hyprctl activeworkspace -j` (no such key → always
   null) and switched to "scrolling" (not a built-in layout — hyprctl
   layouts lists only dwindle/master), so it silently no-op'd. Rewrite to
   toggle the real general:layout between dwindle and master.

3. show_setup_menu offered Power Profile unconditionally, but powerprofilesctl
   is absent everywhere (power-profiles-daemon is force-off on laptop in
   favour of TLP and never enabled on desktop), so the entry died with
   "command not found". Gate it behind `command -v powerprofilesctl`.

Verified (1) and (2) against live Hyprland in the VM: aspect flips
[0,0]<->[1,1], layout flips dwindle<->master.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 14:48:37 +01:00
Bernardo Magri
0fbc3d9c82 fix: ground + fix three Pillar-9 candidate bugs from the script sweep
All checks were successful
Check / eval-and-lint (push) Successful in 6m40s
All three confirmed real on inspection.

1. nomarchy-refresh-config was dead on every system: it read
   /etc/nixos/nomarchy/{core/home/config,features} (the source tree never
   lands there — only /etc/nomarchy on VM-guest/live ISO) and fell back to
   ~/.local/share/nomarchy/config, which nothing deployed despite SKILL.md
   documenting it. Deploy the pristine core/home/config tree to
   ~/.local/share/nomarchy/config via xdg.dataFile and read from there, so it
   works without a source checkout; its live caller nomarchy-refresh-fastfetch
   now succeeds. Fix two stale SKILL.md examples (waybar/, hypr/) that pointed
   at non-existent stock paths.

2. nomarchy-docs-scripts shipped a stale divergent copy in
   features/scripts/utils/ (in the user nomarchy-system-scripts package)
   beside the canonical bin/utils dev tool — it errored outside the repo.
   Grounding it surfaced the identical bug in nomarchy-docs-keybindings.
   Delete both duplicates, add them to the generator's self-reference
   denylist so they don't show as false `missing`, regenerate docs/SCRIPTS.md.

3. Home ~/.config/nomarchy/state.json was never seeded on non-installer
   systems, so nomarchy-installed-summary rendered "—" for theme/font/panel.
   Add an idempotent home-manager activation seed in core/home/state.nix that
   backfills the resolved values (defaults * existing — user choices and
   runtime-only keys like welcome_done always win).

Verified: flake check + full eval matrix clean; refresh-config happy/error
paths and the seed deep-merge proven by hand.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 14:25:02 +01:00
Bernardo Magri
00b8214cb1 docs(agent): guardrail — never mkDefault a list/attrset option that merges
Some checks failed
Check / eval-and-lint (push) Failing after 7m7s
The "mkDefault everywhere user might override" rule is what caused the
home.packages bug. Clarify: mkDefault is for scalars; on list/attrset
options that other modules contribute to, a mkDefault def is dropped
entirely (filterOverrides) rather than merged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 14:00:29 +01:00
Bernardo Magri
f34f59c2aa fix: drop mkDefault on three more list options it was silently dropping
Some checks failed
Check / eval-and-lint (push) Has been cancelled
Same footgun as the home.packages fix, found by sweeping the tree for
`mkDefault` on list options that other modules contribute to at normal
priority (so filterOverrides discards the mkDefault def entirely):

  * themes/engine/sddm.nix — environment.systemPackages = mkDefault
    [ nomarchy-sddm-theme ] was dropped, so the SDDM greeter theme package
    was never installed (unthemed login).
  * themes/engine/plymouth.nix — boot.kernelParams = mkDefault [ quiet
    splash loglevel=3 … ] was dropped, so boots weren't quiet/clean.
  * features/desktop/waybar/default.nix — home.packages = mkDefault
    [ font-awesome ] was dropped, so waybar's icon font was missing.

Verified via eval: nomarchy-sddm-theme now in systemPackages, "quiet" in
kernelParams, font-awesome in home.packages. Left the genuinely-safe
single-definition mkDefaults alone (plymouth.themePackages,
resolved.fallbackDns, hyprsunset.extraArgs) and the hybridGPU videoDrivers
mkDefault (it outranks nixpkgs' mkOptionDefault on real hardware).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 13:59:46 +01:00
Bernardo Magri
b029edb5b4 docs(roadmap): log the mkDefault-on-home.packages bug found chasing the D-Bus error
Some checks failed
Check / eval-and-lint (push) Failing after 6m51s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 10:43:41 +01:00
Bernardo Magri
1117dcfc37 fix(home): drop mkDefault on home.packages — it discarded the whole app list
Some checks failed
Check / eval-and-lint (push) Has been cancelled
Chasing a "DBus.Error … name is not activatable" from notify-send (mako),
the root cause turned out to be far bigger: home.packages in
features/default.nix was wrapped in lib.mkDefault. home.packages is a
list, and the module system's filterOverrides keeps only the
highest-priority definitions — so the moment any other module sets
home.packages at normal priority (features/scripts/default.nix's
`[ nomarchy-scripts ]`, the installer's profile packages), this entire
mkDefault list was DROPPED. Every install was silently missing firefox,
thunar, imv, mpv, swww, mako, hyprlock, rofi, etc. — which broke
notifications (mako never installed → exec-once fails → notify-send dead)
and the lock screen (hyprlock missing), and hid a stale `rofi-wayland`
reference (merged into `rofi` upstream) that only errored once the list
was live again. Remove the mkDefault so the list merges (home.packages =
52 pkgs, up from 31; mako/hyprlock/firefox/… now present) and fix
rofi-wayland -> rofi.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 10:40:44 +01:00
Bernardo Magri
6e391b1843 docs(roadmap): log Pillar 9 walker menu verification + two fixes
Some checks failed
Check / eval-and-lint (push) Failing after 6m40s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 10:05:35 +01:00
Bernardo Magri
c5fe0e09fa fix(walker): background selector must follow symlinks (find -L)
Some checks failed
Check / eval-and-lint (push) Has been cancelled
Pillar 9 VM test: after the menu-registration fix, the walker background
selector menu opened but still showed "No Results". Its GetEntries ran
`find <dir> -type f`, but home-manager deploys the per-theme background
images as symlinks into the nix store, and `-type f` doesn't follow
symlinks. Add -L (the sibling nomarchy_themes.lua already uses `find -L`).
Verified in the VM: `find -type f` -> 0, `find -L` -> the backgrounds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 10:05:05 +01:00
Bernardo Magri
c831b01b0a fix(walker): deploy elephant theme/background menus where elephant loads them
Some checks failed
Check / eval-and-lint (push) Failing after 6m40s
Pillar 9 VM test: the walker theme picker (and background selector)
returned "No Results". Root cause: nomarchy_themes.lua and
nomarchy_background_selector.lua (elephant lua menu providers named
"nomarchythemes" / "nomarchyBackgroundSelector") were deployed via the
bulk nomarchy config to ~/.config/nomarchy/default/elephant/ — outside
elephant's provider search path, so elephant never registered them and
`nomarchy-launch-walker -m menus:nomarchythemes` (used by nomarchy-theme,
nomarchy-wallpaper, and nomarchy-menu Style submenu) had no backing menu.

Move them into the elephant config (features/apps/elephant/config/menus/)
so they deploy to ~/.config/elephant/menus/. Verified on a fresh VM boot:
`elephant listproviders` now lists menus:nomarchythemes +
menus:nomarchyBackgroundSelector, and the walker theme picker renders all
21 palettes with per-theme preview images.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 09:54:06 +01:00
Bernardo Magri
704cc70c84 docs(roadmap): log full installer end-to-end VM install + boot verification
Some checks failed
Check / eval-and-lint (push) Failing after 6m34s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 09:33:26 +01:00
Bernardo Magri
aaae29fb4d docs(roadmap): log Pillar 9 script sweep + theme visual pass progress
Some checks failed
Check / eval-and-lint (push) Failing after 6m51s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 08:36:00 +01:00
Bernardo Magri
23d432f279 fix(scripts): add python3 so the XPS haptic-touchpad service runs
Some checks failed
Check / eval-and-lint (push) Failing after 6m43s
Pillar 9 VM script sweep: nomarchy-haptic-touchpad failed with
"env: 'python3': No such file or directory". It's a python3 script
(#!/usr/bin/env python3) wired as systemd.services.nomarchy-haptic-touchpad
in core/system/hardware.nix (Dell XPS haptic feedback), run from the
nomarchy-system-scripts wrapper — but python3 wasn't in systemScriptDeps,
so the wrapper's PATH lacked it and the service died on every XPS. Add
python3 (stdlib-only script, plain pkgs.python3 suffices). Verified the
rebuilt wrapper resolves python3 and the script runs to its clean
"no device found" exit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 22:21:04 +01:00
Bernardo Magri
8e2c27087f docs(roadmap): add Pillar 9 — live VM runtime QA
All checks were successful
Check / eval-and-lint (push) Successful in 7m3s
New pillar to drive the distro running in a VM and verify what actually
works vs. what only looks right in source: run every nomarchy-* command,
walk every menu entry, switch through all 22 palettes and eyeball
rendering, fire every keybinding, drive the installer. Documents the
method (build -> boot headless -> screendump/sendkey) proven in the first
VM-boot pass, the per-component checklist, and the deliverable format. The
old "Pillar 8 runtime verification" Now-board punch-list folds into it.
AGENT.md's verify step now points at the headless VM screenshot flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 21:58:27 +01:00
Bernardo Magri
70d0b56259 docs(roadmap): log Pillar 8 first VM-boot verification pass
Some checks failed
Check / eval-and-lint (push) Has been cancelled
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 21:53:47 +01:00
Bernardo Magri
e98ebe5d8c fix(hypr): correct invalid window-rule syntax in pip/retroarch/steam/system
Some checks failed
Check / eval-and-lint (push) Has been cancelled
Booting the VM peeled back two more layers of Hyprland config errors after
the geforce/moonlight fix:

  * pip.conf used underscored rule names with stray values —
    `keep_aspect_ratio on` and `border_size 0`. Hyprland's rules are
    `keepaspectratio` (boolean, no value) and `bordersize 0`.
  * retroarch/steam/system.conf wrote `idleinhibit, <mode>` with a comma,
    so Hyprland read <mode> as a selector ("Invalid value: always/
    fullscreen"). The mode is space-separated: `idleinhibit always`.

Verified clean in a rebuilt VM — the boot-time config-error overlay is
gone. All Omarchy-era rule-syntax holdovers, exposed once Component 5
wired apps.conf to source every app rule file.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 21:52:40 +01:00
Bernardo Magri
8e5e63facb fix(installed-summary): drop compgen (absent in wrapped bash)
Booting the VM showed "line 31: compgen: command not found" from
nomarchy-installed-summary on first boot. compgen is a bash
programmable-completion builtin, and the non-interactive bash the script
gets wrapped with (via makeWrapper + patchShebangs) is compiled without
progcomp. Beyond the visible error, the battery-presence check silently
failed to the else branch, so a laptop was always reported as "desktop".
Replace `compgen -G` with a nullglob array (a shopt, always available).
The installer's identical check runs under the ISO's interactive bash, so
it was unaffected — this script is the only compgen user.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 21:30:35 +01:00
Bernardo Magri
14c22cbbaa fix(hypr): valid windowrulev2 syntax for geforce/moonlight
Booting the desktop VM surfaced Hyprland config errors on every start:
"config option <windowrule:name> does not exist" from apps/geforce.conf
and apps/moonlight.conf. Both used an invalid `windowrule { name=…;
class:=…; idle_inhibit=… }` block form (an Omarchy-era holdover) that
Hyprland rejects line-by-line — exposed once Component 5 wired apps.conf
to source all 17 app rule files. Rewrite as single-line windowrulev2
rules matching every other apps/*.conf: idle-inhibit on fullscreen for
GeForceNOW; open-fullscreen + idle-inhibit for Moonlight.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 21:30:35 +01:00
Bernardo Magri
dc9e74ca12 fix(scripts): use mktemp for state.json writes, not a fixed /tmp path
All checks were successful
Check / eval-and-lint (push) Successful in 6m57s
Ten state-mutating sites across seven scripts wrote through a predictable,
world-writable temp path (`/tmp/state.json`, `/tmp/system-state.json`)
before the atomic `sudo mv`. Because the `>` redirect runs as the invoking
user (sudo doesn't cover redirects), the shared fixed path is a symlink/
TOCTOU target and collides if two of these run concurrently. Switch each
to a per-invocation `mktemp`; the atomic rename into place is unchanged.
nomarchy-theme-set already used a temp var for its home-state write — this
makes its system-state write consistent and cleans the temp up on failure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 21:05:04 +01:00
Bernardo Magri
95d36f8ec7 docs(options): document nomarchy.hyprland.{gaps_in,gaps_out,border_size}
These three home options (Hyprland inner/outer gaps + active-border width,
read from state.json, wired in features/desktop/hyprland/default.nix) were
the only real options missing from OPTIONS.md — a guardrail violation
(every nomarchy.* option must be documented). Found via a full diff of the
live option tree against the doc's headings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 21:02:21 +01:00
Bernardo Magri
9751da2523 fix(docs-scripts): pin LC_ALL=C so SCRIPTS.md ordering is deterministic
All checks were successful
Check / eval-and-lint (push) Successful in 6m35s
CI's drift check failed on pure ordering noise: the generator's `sort`
collated rows and caller lists by the ambient locale (en_GB.UTF-8 on the
dev box that committed the file, C in the CI container), so `-` vs `/` and
`-` vs `s` ordered differently (e.g. theme-update vs themes-prebuild,
caller-list order). Force LC_ALL=C in the generator and regenerate
docs/SCRIPTS.md in that collation, so the committed copy and any
regeneration — dev box or CI — are byte-identical.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 08:17:41 +01:00
Bernardo Magri
e8cb346759 ci: collapse eval matrix from ~39 evals to ~3 (was timing out at 3h)
Some checks failed
Check / eval-and-lint (push) Failing after 6m40s
The per-toggle + per-palette matrix did ~39 full-system evaluations (16
toggle toplevels + 21 palettes each via a full extendModules eval + 2
home) and ran ~2h55m on the small self-hosted runner — long enough to hit
act_runner's 3h container lifetime (sleep 10800) and get killed.

Redesign:
  * Combine compatible toggles into 3 configs (laptop-stack, desktop-stack,
    impermanence-multi) instead of one eval per toggle. A failure means
    re-run the suspect toggle alone; the trace hint covers that.
  * Check palettes directly via the lib — the per-palette risk is the pure
    base00 -> RGB hex math in plymouth.nix, which needs no module-system
    instantiation. Forcing the palette attrset also catches a missing one.
  * Drop the home configs; the per-output flake-check step already forces
    both homeConfigurations.

~39 full evals -> 3, plus a near-instant palette pass. Runs in ~1m locally
(warm). AGENT.md updated for the new combined-scenario structure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 08:09:23 +01:00
Bernardo Magri
2dda8e2bb5 ci: check flake outputs per-output to skip the OOM-heavy package
Some checks failed
Check / eval-and-lint (push) Failing after 3h0m3s
`nix flake check --no-build` also evaluates packages.allThemeVariants, a
linkFarm whose drvPath forces all 22 home generations into memory at once
— the runner OOM-killed there ("Killed" after allThemeVariants). Replace
it with an explicit per-output eval that forces all 4 system closures
(incl. assertions), both standalone home generations, the installer VM
package, the overlay and the app, and skips only allThemeVariants/default.
Each tryEval is GC'd before the next, so peak memory is one config rather
than twenty-two. The eval matrix already validates every palette
one-at-a-time, so dropping that package from CI loses no real coverage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 22:51:05 +01:00
Bernardo Magri
6c66db9b88 ci: realize walker src via nix build to prime cold store
Some checks failed
Check / eval-and-lint (push) Failing after 9m24s
Diagnosed the persistent "path '…-source' is not valid": it's walker's
flake reading its own source at eval time — importTOML
resources/config.toml in its home-manager module and lib.fileset.toSource
for the package src. On a cold store the walker input source isn't
materialized, and neither --no-build flake check nor `nix flake archive`
makes the fileset-derived src readable. Replace the archive step with a
`nix build` of walker's src attribute, which eagerly realizes it (and the
input it reads from) so the subsequent flake check / eval matrix find
every path valid.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 22:27:15 +01:00
Bernardo Magri
ebdd32265b ci: nix flake archive before check to materialize input sources
Some checks failed
Check / eval-and-lint (push) Failing after 1m11s
flake check kept failing on a cold store with "path '…-source' is not
valid" while evaluating Stylix's import-from-derivation in the
home-manager fontconfig text. Nix keeps flake-input sources in a git
cache and only materializes the -source store paths lazily; IFD readFile
needs them as real store paths. Works locally only because prior builds
already materialized them. Add a `nix flake archive` step that copies
every transitive input into the store before the check (and before the
eval matrix, which has the same need).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 22:13:58 +01:00
Bernardo Magri
7980c2f5ff ci: pin Nix to 2.31.5 to fix lazy-trees IFD failure
Some checks failed
Check / eval-and-lint (push) Failing after 1m5s
flake check kept failing with "path '…-source' is not valid" while
evaluating the home-manager fontconfig text (Stylix/base16.nix do
import-from-derivation). Root cause: the installer pulled the latest Nix
(2.34), whose lazy-trees / git-cache behaviour doesn't materialise
flake-input source paths into the store, so the IFD reads can't find
them. Pin the install to 2.31.5 — the version that wrote flake.lock
locally and evaluates the flake cleanly all session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 22:09:17 +01:00
Bernardo Magri
f24d49be08 ci: disable Nix sandbox so Stylix IFD can realize sources
Some checks failed
Check / eval-and-lint (push) Failing after 1m3s
flake check evaluates the home-manager fontconfig text, which via
Stylix/base16.nix does import-from-derivation — eval must realize fetched
`-source` paths. The single-user Nix in the runner container can't set up
the build sandbox (no user namespaces), so realization failed with
"path '…-source' is not valid". Set sandbox = false for the runner
(safe in a throwaway CI container).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 22:05:12 +01:00
Bernardo Magri
da5e5cf2aa ci: create nixbld build users for root single-user Nix install
Some checks failed
Check / eval-and-lint (push) Failing after 1m13s
Empty group wasn't enough — this Nix version errors with "build users
group 'nixbld' has no members". Create the nixbld group plus 10 build
users (what a multi-user install does) before running the installer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 22:01:46 +01:00
Bernardo Magri
b676f43afe ci: fix root single-user Nix install (nixbld group + SSL cert)
Some checks failed
Check / eval-and-lint (push) Failing after 7s
The single-user installer, running as root in the catthehacker container,
aborts because its bundled nix.conf sets build-users-group=nixbld and the
group doesn't exist ("the group 'nixbld' ... does not exist"). Pre-create
an empty nixbld group so config validation passes; single-user builds run
as root and never use it. Also set NIX_SSL_CERT_FILE at the job level
since we add nix to PATH without sourcing the installer profile that would
otherwise export it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 22:00:03 +01:00
Bernardo Magri
9767a5c5dd ci: install Nix via shell step instead of node24 JS action
Some checks failed
Check / eval-and-lint (push) Failing after 7s
act_runner v0.2.11 bundles an `act` that supports up to node20, but
DeterminateSystems/nix-installer-action@main moved to the node24 runtime,
so the job died with "runs.using ... got node24". Replace the JS action
with a plain single-user Nix install (--no-daemon, no systemd needed in
the catthehacker container) and set NIX_CONFIG at the job level so the
bare `nix flake check` still gets flakes. A run step has no node-runtime
coupling, so this won't break again when an action bumps its runtime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 21:56:53 +01:00
Bernardo Magri
1dd0e2f4b9 ci: move workflow to .gitea/workflows so Gitea picks it up
Some checks failed
Check / eval-and-lint (push) Failing after 2s
Gitea only scans .gitea/workflows and .github/workflows; it does not scan
.forgejo/workflows (that path is Forgejo-only). The CI was therefore
dormant on a Gitea instance regardless of whether Actions was enabled.
git mv to .gitea/workflows/ (scanned by both Gitea and Forgejo). Updated
the live references in STRUCTURE.md (Gitea + act_runner), AGENT.md, and
today's ROADMAP entry; left the dated historical Shipped entries as the
changelog they are.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 21:36:51 +01:00
Bernardo Magri
8547fa70d9 feat(ci): eval matrix for opt-in nomarchy.* toggles
nix flake check --no-build only evaluates the four default configs, so a
bug that only fires when a nomarchy.* toggle is flipped sails through —
exactly how the vscode option rename and the impermanence systemd-stage-1
assertion both reached main undetected.

Add bin/utils/nomarchy-eval-matrix: layers each opt-in scenario (16
toggles, both system and home halves) onto nixosConfigurations.default
via extendModules and forces system.build.toplevel.drvPath (which forces
assertion checks); also forces all 21 palettes through the system-side
Plymouth base00->RGB math that the home-only allThemeVariants never
reaches, plus both standalone homeConfigurations. Per-scenario results
come from builtins.tryEval so one failure doesn't mask the rest; verified
it goes red on a re-injected assertion failure and a bad option ref, green
on the current tree.

Wired into .forgejo/workflows/check.yml after flake check (jq via nix
shell so it doesn't depend on the runner image). AGENT.md §5 now tells
future agents to add a scenario when they add/rename an opt-in option.

nomarchy-docs-scripts: filter systemd-service declarations (.services.
nomarchy-) and denylist the eval-matrix repo tool so neither shows as a
dangling "missing" reference; also retroactively clears the latent
nomarchy-flathub-init drift from the gaming-flathub commit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 21:21:28 +01:00
Bernardo Magri
38c70e4aaf fix(impermanence): rollback as systemd initrd service, not postDeviceCommands
themes/engine/plymouth.nix enables systemd stage-1 initrd
(boot.initrd.systemd.enable) distro-wide, and Plymouth is imported
unconditionally from core/system/default.nix. systemd stage 1 hard-rejects
boot.initrd.postDeviceCommands with a failed assertion, so every config
with nomarchy.system.impermanence.enable = true — including installs that
chose impermanence at the installer prompt — failed to evaluate.

Convert the Erase-Your-Darlings rollback to a boot.initrd.systemd.services
oneshot unit ordered after the LUKS mapping opens and before sysroot.mount,
and add boot.initrd.systemd.initrdBin for btrfs-progs/coreutils/util-linux/
findutils (the systemd initrd doesn't ship them by default). Script body is
unchanged. Verified eval via extendModules on nixosConfigurations.default;
boot-time wipe semantics still need a real wipe-boot cycle (Pillar 8).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 18:24:01 +01:00
Bernardo Magri
905ed4f6d8 fix(vscode): move extensions under profiles.default
programs.vscode.extensions was renamed to
programs.vscode.profiles.default.extensions in home-manager. The bare
option still worked via the compat shim but emitted a deprecation
warning on every eval (21× — once per home evaluation in flake check)
and will break when the alias is dropped. userSettings already lived
under profiles.default; extensions now joins it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 18:11:29 +01:00
Bernardo Magri
9b26eda388 fix(vscode): pin theme extensions for 10 marketplace palettes
Before this fix, only the 6 palettes whose theme extensions ship in
pkgs.vscode-extensions had working VSCode theming. Every other palette
had `workbench.colorTheme` set to a name VSCode couldn't find, so it
silently fell back to its built-in default. Including the DEFAULT
summer-night palette (sainnhe.everforest) — the default install had
broken VSCode theming.

Probed the 13 unique extensions against the VSCode marketplace
extensionquery API:

  - 10 exist and are pinnable: sainnhe.everforest,
    shadesOfBuntu.flexoki-light, qufiwefefwoyn.kanagawa,
    oldjobobo.{lumon,miasma,retro-82}-theme, TahaYVR.matteblack,
    jovejonovski.ocean-green, monokai.theme-monokai-pro-vscode,
    Bjarne.white-theme.
  - 3 don't exist on the marketplace and are unpublished custom
    Nomarchy themes: Bjarne.{ethereal,hackerman,vantablack}-nomarchy.
    Logged as a new Later row.

For the 10, fetched version + sha256 via:

  URL='https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage'
  nix store prefetch-file --hash-type sha256 "$URL"

Added a marketplaceExtensions list to features/apps/vscode.nix that
wraps each in pkgs.vscode-utils.extensionFromVscodeMarketplace and
concatenates with the existing nixpkgs-packaged list — so 10 more
palettes (including the default) now get correct VSCode theming on
first launch. Smoke-built sainnhe.everforest end-to-end. Module
comment documents the version-bump procedure.

docs/OPTIONS.md updated: the nomarchy.vscode.devExtensions entry
drops the "still break" caveat for everything except the three
unpublished Bjarne palettes.

`nix flake check --no-build` clean.
2026-05-22 20:21:43 +01:00
Bernardo Magri
a901b1db0b chore(chromium): delete broken static Default/Preferences deployment
features/apps/chromium/default.nix was deploying a 204-byte static
Default/Preferences via Home Manager symlink into Chromium's mutable
profile directory. The deployment is structurally broken — Chromium
expects to write that file at runtime, so either the symlink is
silently replaced on first save (losing the static defaults) or the
write fails silently.

The contents are also redundant + incorrect:

  - `extensions.theme.{use_system,use_custom} = false` — already
    superseded by the managed-policy approach (BrowserThemeColor
    overrides any user-installed theme extension regardless).
  - `browser.theme.{color_scheme,user_color} = 2` — hardcoded "dark"
    via Chromium's color_scheme enum, conflicting with the dynamic
    BrowserColorScheme = isLightTheme ? "light" : "dark" set by
    core/system/browser.nix. A user on flexoki-light / summer-day /
    catppuccin-latte / rose-pine / white would have had a static-vs-
    policy mismatch every time.

Removed the entire features/apps/chromium/ directory (default.nix +
config/Default/Preferences) and dropped the import from
features/default.nix. Chromium theming continues to flow through the
system-level managed policy, which is the canonical chromium-on-NixOS
path.

`nix flake check --no-build` clean.
2026-05-22 19:32:51 +01:00
Bernardo Magri
7e25ae637d docs(roadmap): ship Plymouth per-palette templating
Moved the Next-column row → Shipped following commit 474bc16
("feat(plymouth): boot splash background follows the active palette").
Next column is now empty.
2026-05-22 19:27:30 +01:00
Bernardo Magri
474bc16eb3 feat(plymouth): boot splash background follows the active palette
themes/engine/plymouth/nomarchy.script had
`Window.SetBackgroundTopColor(0.101, 0.105, 0.149)` hardcoded — a
Tokyo-Night-ish #1a1b26 — and nomarchy.plymouth had a matching
`ConsoleLogBackgroundColor=0x1a1b26`. Both were frozen regardless of
the active nomarchy.system.theme.

Replaced the literals with placeholders (@BG_R@, @BG_G@, @BG_B@,
@BG_HEX@) in the source files. themes/engine/plymouth.nix now reads
the active palette via `nomarchyLib.getPalette
config.nomarchy.system.theme`, converts palette.base00 into three
0.0–1.0 floats (Nix has no floating-point math, so `(byte * 1000) /
255` integer division formatted as `0.XXX`), and `sed`-substitutes
both files during installPhase.

Smoke-built the derivation against the default summer-night palette:

  $ cat .../nomarchy.script | grep BackgroundTopColor
  Window.SetBackgroundTopColor(0.176, 0.207, 0.231);
  $ cat .../nomarchy.plymouth | grep ConsoleLogBackgroundColor
  ConsoleLogBackgroundColor=0x2d353b

Both match the expected byte→float conversion from base00=2d353b.

Closes the "Plymouth theme variants per palette" Next-column item.
`nix flake check --no-build` clean.
2026-05-22 19:27:04 +01:00
Bernardo Magri
a14491b1cc docs(roadmap): ship nomarchy.overrides loader
Moved the Next-column row → Shipped following commit 38429a3
("feat(overrides): wire nomarchy.overrides.paths into xdg.configFile").
2026-05-22 18:49:49 +01:00
Bernardo Magri
38429a32df feat(overrides): wire nomarchy.overrides.paths into xdg.configFile
The option surface (`enable`, `paths`) lived in core/home/overrides.nix
since 2026-05-18 but didn't do anything — paths was a reserved
attrset that never reached xdg.configFile.

Now wired: every entry in nomarchy.overrides.paths substitutes the
matching xdg.configFile.<key>.source at lib.mkForce priority, beating
Nomarchy's own lib.mkDefault writes. Other fields on the original
entry (recursive, etc.) survive via the standard module-system merge.

  nomarchy.overrides.paths = {
    "nomarchy/default/hypr/looknfeel.conf" = ./looknfeel.conf;
    "waybar/style.css"                     = ./waybar.css;
  };

Picked the attrset model from the row's two options rather than
runtime ~/.config/nomarchy/overrides/ directory discovery — Nix needs
every managed file declared at evaluation time, and the attrset
matches the explicit-config shape used everywhere else in the
Nomarchy surface.

docs/OPTIONS.md updated: both overrides.{enable,paths} entries get
real content + an example, the configOverrides row now contrasts
bulk-vs-per-file accurately, and the "Where these are defined" footer
drops the (reserved) tag.

`nix flake check --no-build` clean.
2026-05-22 18:49:19 +01:00
Bernardo Magri
ce7010bb67 feat(accessibility): home-side Hyprland companion
New nomarchy.accessibility.enable home option mirroring
nomarchy.system.accessibility.enable. When enabled, core/home/
accessibility.nix contributes a Hyprland extraConfig block via
lib.mkAfter:

  - input.repeat_rate = 25 (from 40)
  - input.repeat_delay = 1000 ms (from 600)
    Holding a key isn't a runaway machine-gun for low-mobility users.

  - bindd = SUPER ALT, S, Launch Orca, exec, orca
    The system preset already puts orca on PATH.

mkAfter guarantees the slowdown wins over the templated input.conf.
Documented in docs/OPTIONS.md. The third item from the original Next
row — a high-contrast palette — is split into its own Later row
because it's a design task (24-colour WCAG AAA palette + icon family
choice) that wants its own review.

`nix flake check --no-build` clean.
2026-05-22 18:42:13 +01:00
Bernardo Magri
099d81f11e docs(roadmap): ship Gaming flathub remote
Moved the entry from Next → Shipped following commit 2948dc4
("feat(gaming): register Flathub remote via one-shot systemd unit").
2026-05-22 18:34:22 +01:00
Bernardo Magri
2948dc4dbf feat(gaming): register Flathub remote via one-shot systemd unit
services.flatpak.enable = true (set inside core/system/gaming.nix's
mkIf cfg.enable block) ships flatpak but doesn't add any remotes, so
`flatpak install` and the Discover GUI returned empty results until
the user ran the manual `flatpak remote-add` one-liner. nixpkgs has
no declarative remote-add API yet.

Added systemd.services.nomarchy-flathub-init: a Type=oneshot,
RemainAfterExit=true unit that runs
`flatpak remote-add --if-not-exists flathub
  https://dl.flathub.org/repo/flathub.flatpakrepo`
after network-online.target. The --if-not-exists flag keeps it
idempotent across reboots and re-runs.

Lives under the gaming preset (where flatpak is wired today); lift
to a dedicated module when another preset needs flatpak.

Closes the "Gaming — declarative flathub remote" Next-column item.
`nix flake check --no-build` clean.
2026-05-22 18:33:51 +01:00
Bernardo Magri
90f9a29cb6 fix(menu): remove "Setup → Config" submenu
show_setup_config_menu was an Omarchy holdover where users edited
mutable config files at runtime. In Nomarchy:

  - hyprland.conf, hypridle.conf, hyprsunset.conf, walker/config.toml,
    waybar/config.jsonc are all Home-Manager-generated from declarative
    settings — a `home-manager switch` clobbers any edit.
  - hyprlock.conf and swayosd/config.toml point at paths the modules
    don't deploy at all; open_in_editor created empty files.
  - ~/.XCompose is a HM symlink into /nix/store — read-only.

Dropped the entire submenu function and the "  Config" item from
show_setup_menu (and the matching *Config*) case branch). Persistent
settings go through the relevant nomarchy.* option in
/etc/nixos/home.nix (or system.nix); when the nomarchy.overrides.*
loader ships, a successor menu can route through
~/.config/nomarchy/overrides/.

Side effect (caught by the SCRIPTS.md regen): nomarchy-restart-xcompose
is now `unused?` — its only caller was the XCompose case I just
removed. Left for a future Pillar 3 cleanup rather than widening
this PR.

`bash -n` clean.
2026-05-22 18:30:48 +01:00
Bernardo Magri
055832e916 fix(waybar): gate enable on toggles.waybar (Nix-level, not session-local)
features/desktop/waybar/default.nix previously set
`programs.waybar.{enable,systemd.enable} = lib.mkDefault true`
unconditionally. The toggle script wrote .waybar to state.json and
pkill/exec'd waybar for instant feedback, but the next rebuild
re-enabled it because the Nix module didn't read the toggle. Result:
the bar came back on every rebuild/reboot regardless of the persisted
state — inconsistent with toggles.idle (gates services.hypridle.enable)
and now toggles.nightlight (gates services.hyprsunset.enable).

programs.waybar.{enable,systemd.enable} now follow
config.nomarchy.toggles.waybar. nomarchy-toggle-waybar flips the
running systemd user unit (`systemctl --user start/stop waybar.service`)
for instant feedback and writes .waybar back to state.json so the next
rebuild realigns. Disabled toggle now means no waybar across rebuilds
+ reboots, matching the option's documented meaning ("Whether the top
bar is enabled").

`nix flake check --no-build` + `bash -n` clean.
2026-05-22 18:23:35 +01:00
Bernardo Magri
161542c420 fix(nightlight): gate hyprsunset on the toggle, drop hardcoded temperature
features/desktop/nightlight.nix previously set
`services.hyprsunset.enable = lib.mkDefault true` unconditionally and
baked the temperature (4000K when toggles.nightlight, 6500K otherwise)
into extraArgs at Nix-eval time. The toggle script bypassed systemd:
pkill on disable, `hyprctl dispatch exec hyprsunset --temperature 4000`
on enable — racing the systemd-managed instance and hardcoding 4000K
regardless of nomarchy.nightlightTemperature. The "Always enabled, we
control via IPC and state" comment was misleading: no IPC, the
temperature was rebuild-time, and the script forked a parallel
process.

Path (b) from the Later row:

  - services.hyprsunset.enable now follows config.nomarchy.toggles.
    nightlight — symmetric with services.hypridle.enable ← toggles.idle.
    Disabled toggle = no process running.
  - extraArgs always reads from config.nomarchy.nightlightTemperature.
    Drops the 6500K neutralising fork; when off the unit just doesn't
    start.
  - nomarchy-toggle-nightlight flips the running systemd user unit via
    `systemctl --user start/stop hyprsunset.service` for instant
    feedback, reads nightlightTemperature from state.json for the
    notify-send line, and writes .nightlight back to state.json so the
    next rebuild realigns services.hyprsunset.enable.

`nix flake check --no-build` + `bash -n` clean.
2026-05-22 18:20:44 +01:00
Bernardo Magri
3bcd92df02 feat(keymap): route installer layout choice into Hyprland's Wayland session
core/home/config/nomarchy/default/hypr/input.conf hardcoded
`kb_layout = us`, so the installer's services.xserver.xkb.layout and
console.keyMap writes (both set from the installer's KEYMAP_LAYOUT
prompt) only reached XWayland apps and the TTY console. Native-Wayland
apps — i.e. almost everything in a Nomarchy desktop — fell back to US
regardless of what the user picked. Surprising for any non-US user.

Path (a) from the Later row:

  - Added nomarchy.keymap.{layout,variant} to core/home/options.nix
    (defaults "us" / "").
  - Deleted the static input.conf from the bulk nomarchy/ deploy.
  - Replaced it with an explicit
    xdg.configFile."nomarchy/default/hypr/input.conf".text in
    core/home/configs.nix that interpolates the option values into
    kb_layout / kb_variant.
  - Installer's home.nix heredoc now writes
      nomarchy.keymap = { layout = "$KEYMAP_LAYOUT"; variant = "$KEYMAP_VARIANT"; };
    alongside nomarchy.formFactor, so the layout reaches Hyprland
    consistently with system.nix's xkb.layout / console.keyMap.

Documented in docs/OPTIONS.md (new `nomarchy.keymap.layout` /
`nomarchy.keymap.variant` entry). `nix flake check --no-build` clean.
2026-05-22 18:14:17 +01:00
Bernardo Magri
be597571ad refactor(flake): consolidate palette imports through nomarchyLib
flake.nix was re-importing ./themes/palettes and recomputing
themeNames via builtins.attrNames in its outputs `let`, even though
lib/default.nix already exports both. Two evaluations of the same
data, same result today — drift risk tomorrow as soon as one
computation grows extra logic the other doesn't.

Added `nomarchyLib = import ./lib { inherit lib; }` once and reused
it via `inherit (nomarchyLib) themeNames;` for the allThemeVariants
linkFarm. The local `palettes` binding wasn't read by anything else in
the outputs so it goes away with the rewrite. lib/default.nix is now
the single source of truth for the theme list; modules under core/
and themes/engine/ already import ../../lib the same way and resolve
to the identical evaluation.

`nix flake check --no-build` clean.
2026-05-22 18:07:18 +01:00
Bernardo Magri
8828f1fb3c refactor(system): move programs.uwsm to its own session.nix
The session-manager wiring (uwsm + the Hyprland Wayland-compositor
entry that gives Hyprland a proper graphical-session.target so user
services like nomarchy-wallpaper, walker, and elephant chain off it)
had lived in core/system/virtualization.nix by historical accident —
loaded unconditionally on every install, nothing to do with libvirt
or docker.

Lifted into a dedicated core/system/session.nix and imported from
core/system/default.nix between systemd.nix and virtualization.nix.
virtualization.nix now contains only the libvirt + docker branches
its filename implies.

`nix flake check --no-build` clean. No behaviour change.
2026-05-22 18:04:28 +01:00
Bernardo Magri
e7e89b8333 chore(theme): prune 9 dead templates, document the 2 that ship
themes/templates/ shipped 11 mustache templates, but
nomarchy-theme-set-templates only writes to a path when no file is
already there — and a careful trace shows 9 of the 11 outputs are
either preempted by an earlier write or never read at all:

  - kitty.conf.tpl, ghostty.conf.tpl
      → shadowed by the per-palette generators in
        themes/engine/files.nix added in 8d3ce2d.
  - hyprland.conf.tpl
      → shadowed by files.nix:100, which always writes
        ~/.config/nomarchy/current/theme/hyprland.conf from the
        palette/feature/nord fallback chain.
  - hyprlock.conf.tpl, alacritty.toml.tpl, btop.theme.tpl,
    chromium.theme.tpl, swayosd.css.tpl
      → output paths nothing reads. alacritty + swayosd are themed
        via Stylix / declarative HM options inline. btop reads from
        ~/.config/btop/themes/nomarchy.theme (loader.nix:72), not
        from the theme symlink. chromium is themed via the managed-
        policy module in core/system/browser.nix. hyprlock has no
        consumer of theme/hyprlock.conf anywhere in the tree.
  - hyprland-preview-share-picker.css.tpl
      → orphaned when the share-picker dir was deleted in 20de3d4.

obsidian.css.tpl and keyboard.rgb.tpl stay: the first is consumed by
nomarchy-theme-set-obsidian (copied into every Obsidian vault), the
second by nomarchy-theme-set-keyboard-asus-rog (sets the ROG
keyboard tint via asusctl).

Rewrote Step 6 of docs/creating-themes.md to describe the two live
templates by name and corrected a path bug ("~/.config/nomarchy/themed/"
→ "~/.config/nomarchy/themes/templates/" — the script actually reads
the latter).

`nix flake check --no-build` clean.
2026-05-22 17:59:15 +01:00
Bernardo Magri
c25fe2191a docs(roadmap): drop optional non-LUKS install row
Per user decision: not supporting a non-LUKS install path. Removed
the Now-column entry and the Pillar 4 bullet that tracked it. FDE
stays the only supported install shape.
2026-05-22 17:48:20 +01:00
Bernardo Magri
10f3b312a3 docs(roadmap): ship "What's installed?" summary
Moved the entry from the Now column → Shipped. Pillar 4's
"What's installed?" bullet flipped from (Now) to (Shipped).
2026-05-22 17:46:13 +01:00
Bernardo Magri
0f22c48c45 feat(welcome): show "What's installed?" summary on first boot
New nomarchy-installed-summary script renders a markdown table via
gum format with the install shape the user should verify before they
start customising:

  - theme / font / panel position    (~/.config/nomarchy/state.json)
  - timezone / DNS / hybrid GPU      (/etc/nixos/state.json)
  - form factor                      (BAT* sysfs presence)
  - software profiles                (presence of marker packages)
  - FDE                              (any crypt entry in lsblk)
  - drives                           (lsblk filtered to disk/part/crypt)

nomarchy-welcome calls it as Step 0 — before the theme/font/panel
pickers — and gates progression on a gum input prompt so the user has
to acknowledge before customisation rewrites anything. The script is
also callable standalone from any terminal: `nomarchy-installed-summary`.

Self-contained — no installer-side changes. Software profiles are
detected heuristically (the installer bakes the user's pick into the
generated home.nix as concrete home.packages rather than persisting a
profile list), which is good enough for verification but won't catch
manually-removed profile packages. gum is in the existing categoryDeps
so no new tools are needed; falls back to plain markdown when gum
isn't on PATH (recovery contexts).

Closes the "Installer: What's installed? summary on first boot"
Now-column item from Pillar 4.
2026-05-22 17:45:24 +01:00
Bernardo Magri
802acfdc86 docs(roadmap): close out Pillar 8 / Component 9 (ISOs) + retire QA Now item
Component 9 (ISOs) closeout entry covers the two inline cleanups
(unreachable else branches in nomarchy-build-{iso,live-iso}) and the
regression-class verification: every tool install.sh calls is provided
by either the explicit host packages, the upstream profiles/base.nix
chain (gptfdisk, util-linux, kbd, systemd), or the nrun nix-run
fallback.

With Components 1–10 all shipped, the "Full QA audit" Now-column item
has done its job. Replaced it with a runtime-verification punch-list
entry that consolidates the "needs runtime verification" notes carried
forward by each component's closeout — boot the live ISO and walk
through waybar/menu/option-toggle paths on real hardware.
2026-05-21 21:14:30 +01:00
Bernardo Magri
1ae27cd302 chore(iso): drop unreachable else branches in build helpers
nomarchy-build-iso and nomarchy-build-live-iso both ran under set -e
but then wrapped nix build in an if [ \$? -eq 0 ] block with an else
that printed "Error: ISO build failed." and exit 1. set -e aborts the
script the instant nix build returns non-zero, so the else branch was
never reached — the user saw nix build's own error output and the
script exited.

Removed the dead conditional. Behaviour is identical.
2026-05-21 21:13:41 +01:00
Bernardo Magri
67e5cd6014 docs(roadmap): close out Pillar 8 / Component 8 + log setup-config UX issue
Component 8 (Scripts runtime behavior) closeout entry summarises the
four inline fixes: omacom URL in nomarchy-menu "Learn → Nomarchy",
looknfeel.conf path drift, unreachable Overrides case branch, and
schema-vs-script default drift for the theme fallback in
nomarchy-theme-bg-next.

New Later row tracks an interaction-pattern bug in
show_setup_config_menu: five of nine entries edit files that Home
Manager generates from declarative options, so the next rebuild
clobbers the edit. Two more open paths the modules don't deploy.
Either rewire the menu or surface the ephemerality.
2026-05-21 21:07:34 +01:00
Bernardo Magri
af2d9ffd8e fix(theme): align nomarchy-theme-bg-next default with the schema
The script's jq fallback for .theme was hardcoded to "nord", which
drifted from the lib/state-schema.nix default of "summer-night". With
no state.json (or a blank one), nomarchy-theme-bg-next would look up
backgrounds under themes/palettes/nord/ while the rest of the system
treated summer-night as active — a quiet inconsistency that produced
"no backgrounds found" errors on a system that hadn't yet written a
theme to state.

Matched it to the schema default. lib/state-schema.nix remains the
single source of truth.
2026-05-21 21:07:00 +01:00
Bernardo Magri
b078be3209 fix(menu): route Nomarchy help locally, fix looknfeel path, drop dead branch
Three issues in features/scripts/utils/nomarchy-menu:

(1) "Learn → Nomarchy" called nomarchy-launch-webapp on
https://learn.omacom.io/2/the-nomarchy-manual — an upstream Omarchy
URL, the same one fixed in nomarchy-manual on 2026-05-18. Now calls
nomarchy-manual, which opens the local ~/.local/share/nomarchy/
README.md (or notifies if the source tree isn't synced).

(2) "Style → Hyprland" tried to open ~/.config/hypr/looknfeel.conf,
which is not the path looknfeel.conf is deployed to. The actual file
lives at ~/.config/nomarchy/default/hypr/looknfeel.conf (sourced by
nomarchy.conf via the chain). Updated the path.

(3) The setup-config case statement had an *Overrides* branch but no
matching menu option, so it was unreachable. The overrides loader
(nomarchy.overrides.*) is still in the Next column of the roadmap;
when it ships, both the option AND the case will get added together.
2026-05-21 20:46:21 +01:00
Bernardo Magri
3a269d73eb docs(roadmap): close out Pillar 8 / Component 7 + correct templates row
Component 7 (Theme engine + palettes) closeout entry summarises the
three inline fixes (theme-set early-exit on missing dir; bg-set
state.json persistence + path validation; palette dead-surface
cleanup) plus the script-comment correction.

Updated the existing `themes/templates/*.tpl` Later row: the original
claim "no script in the tree consumes them" was wrong —
nomarchy-theme-set-templates does. Replaced with a concrete
categorisation: (a) functionally dead (alacritty/btop/chromium/swayosd
write to paths nothing reads), (b) superseded by Nix-side generators
(kitty/ghostty after 8d3ce2d), (c) still relevant
(hyprland/hyprlock/obsidian/keyboard.rgb plus the now-orphan
share-picker tpl to verify).
2026-05-21 20:42:33 +01:00
Bernardo Magri
fb4755fdbf docs(theme): correct nomarchy-themes-prebuild header comment
The header said "Run once after install (the installer wires this
up)". The installer doesn't actually wire it up — install.sh:1848
prints a final-screen tip telling the user to run it, but doesn't
invoke it (pre-realising every theme adds significant install time
and the user can opt in later). Corrected the comment to match.
2026-05-21 20:41:43 +01:00
Bernardo Magri
9b06b6c243 chore(palettes): remove dead per-palette files
Two clusters of palette-tree dead surface:

(1) themes/palettes/{flexoki-light,lumon,retro-82,rose-pine}/apps/
chromium.theme — 9-byte comma-separated RGB strings that no script
or Nix module reads. Chromium theming is driven by managed policies
in core/system/browser.nix (BrowserThemeColor / BrowserColorScheme
derived from the active palette's base00 + light-mode flag), not by
per-palette files. The chromium.theme files were vestigial from an
earlier chromium-theming mechanism.

(2) themes/palettes/summer-day/apps/kitty/{kitty.conf,everforest-
light.conf} — a 76KB stray kitty config in a nested apps/kitty/
subdirectory. features/apps/kitty/config/kitty.conf includes
~/.config/nomarchy/current/theme/kitty.conf (root of theme dir, not
under apps/), and themes/engine/files.nix now generates that file
from the active palette's base16 colors (commit 8d3ce2d). So the
summer-day file was at the wrong path AND superseded by the
generator.

`nix flake check --no-build` passes.
2026-05-21 20:39:38 +01:00
Bernardo Magri
893fa91fbf fix(theme): exit on missing theme; persist bg picks across rebuilds
Two related bugs in the theme switcher scripts:

(1) nomarchy-theme-set printed a warning when the theme directory didn't
exist but kept going — it wrote the bad name into state.json and ran
nomarchy-env-update on a broken state. Added an exit 1 after the
warning.

(2) nomarchy-theme-bg-set updated the live ~/.config/nomarchy/current/
background symlink + restarted swaybg but never wrote state.json. The
script is called by the walker background-selector menu
(elephant/nomarchy_background_selector.lua) and by the nomarchy-
wallpaper CLI wrapper, so every wallpaper picked via either path
silently reverted to the active theme's default on the next
home-manager switch — themes/engine/files.nix re-resolves
config.nomarchy.wallpaper at every rebuild. Now writes the chosen path
into state.json's wallpaper field, mirroring nomarchy-theme-bg-next.
Also added a file-exists check so a bogus path fails loudly instead of
leaving a dangling symlink + a failed swaybg process.
2026-05-21 20:35:52 +01:00
Bernardo Magri
4de8afbea9 docs(roadmap): close out Pillar 8 / Component 6 + log VSCode marketplace gap
Component 6 (Apps) closeout entry covers the three inline theming
fixes (kitty/ghostty per-palette colors, btop color_theme name match,
VSCode theme extensions split). One new Later row tracks the 15
palettes — including the default summer-night (sainnhe.everforest) —
whose theme extensions aren't in nixpkgs and need
pkgs.vscode-utils.extensionFromVscodeMarketplace per-palette pinning.

Chromium's static Default/Preferences symlink was confirmed redundant
with the managed-policy intent in core/system/browser.nix, but left
under the existing Later entry (the user already hedged on deletion
without chromium-internals confirmation).
2026-05-21 20:32:38 +01:00
Bernardo Magri
577b3aeb91 fix(vscode): always install palette theme extensions
programs.vscode.profiles.default.userSettings.workbench.colorTheme is
set unconditionally to the active palette's theme name (read from
themes/palettes/<theme>/apps/vscode.json), but the matching theme
extensions were bundled with devExtensions — which defaults to false.
So out of the box, VSCode silently fell back to the built-in dark
theme on every palette.

Split themeExtensions out as always-installed and devExtensions as
opt-in via nomarchy.vscode.devExtensions. themeExtensions covers the 6
palettes whose VSCode theme is packaged in nixpkgs (catppuccin,
catppuccin-latte, nord, tokyo-night, rose-pine, gruvbox).

The other 15 palettes (including the default summer-night, which uses
sainnhe.everforest) still break because their theme extensions are on
the VSCode marketplace but not yet in nixpkgs — handling that needs
pkgs.vscode-utils.extensionFromVscodeMarketplace plus per-palette
publisher/name/version/sha256 metadata. Logged separately.
2026-05-21 20:31:50 +01:00
Bernardo Magri
b52aec28ce fix(btop): point color_theme at the deployed nomarchy.theme
themes/engine/loader.nix:72 deploys the active palette's btop theme to
~/.config/btop/themes/nomarchy.theme, but btop.conf had
color_theme = "current" — btop looked for themes/current.theme, didn't
find it, and silently fell back to the built-in Default theme. So every
palette rendered btop in the same default colors regardless of the
selected Nomarchy theme.

Renamed the config reference to match the deployed file name.

lazygit and tmux both inherit terminal ANSI colors (verified: the tmux
status bar config uses blue/brightblack/etc., not hex), so the kitty +
ghostty + alacritty theming changes from 8d3ce2d cover them
transitively — no module fix needed.
2026-05-21 20:27:12 +01:00
Bernardo Magri
8d3ce2d841 fix(theme): generate per-palette kitty.conf + ghostty.conf
features/apps/kitty/config/kitty.conf:1 contains
  include ~/.config/nomarchy/current/theme/kitty.conf
and features/apps/ghostty/config/config:2 contains
  config-file = ?"~/.config/nomarchy/current/theme/ghostty.conf"

Neither file existed for any of the 22 palettes. The kitty include
failed silently and the ghostty include is optional (?-prefix), so both
terminals rendered with built-in default colors regardless of the
active Nomarchy theme.

Stylix has kitty.enable = true in themes/engine/stylix.nix but the
kitty module uses xdg.configFile rather than programs.kitty, so the
Stylix target had nothing to hook into. ghostty has no Stylix target at
all.

Generated both files from the active palette's base16 colors in
themes/engine/files.nix, mirroring the waybar.css pattern already there.
Color mapping reproduces the original colors.toml fields (background,
foreground, cursor, selection_*, color0..15) via base16 indices —
verified against the inverse mapping in themes/palettes/default.nix.

themes/palettes/summer-day/apps/kitty/kitty.conf (a 76KB stray file in
the wrong tree location) is unaffected by this fix — it was already
dead surface since the include path never resolved to it.
2026-05-21 20:26:13 +01:00
Bernardo Magri
0486e037df docs(roadmap): close out Pillar 8 / Component 5 + log hyprsunset finding
Pillar 8 Component 5 (Desktop stack) closeout entry covers the five inline
fixes from this sweep (hyprland apps.conf wiring, NNOMARCHY typo pair,
broken waybar palette overrides, dead bindings files, mako post-fix verify)
plus the doc reconciles (SCRIPTS.md, KEYBINDINGS.md). One new Later row
captures the nightlight/hyprsunset toggle-vs-systemd inconsistency — Nix
always enables the systemd unit with a rebuild-time temperature while the
toggle script pkills/exec's hyprsunset directly and hardcodes 4000K
instead of reading nightlightTemperature.

Runtime verification (boot live ISO; eyeball waybar across panel
positions × form factors × all 22 palettes, walker launcher modes, the
screensaver at idle) remains on the user before declaring Component 5
fully closed.
2026-05-21 20:19:31 +01:00
Bernardo Magri
40b62124e6 fix(scripts): correct \$NNOMARCHY_TOGGLE_* typos breaking 2 toggles
nomarchy-menu:330 and nomarchy-launch-screensaver:16 referenced
\$NNOMARCHY_TOGGLE_SUSPEND and \$NNOMARCHY_TOGGLE_SCREENSAVER with a
double-N. The real env vars injected by features/scripts/default.nix:69-73
are single-N. Both reads always resolved to the empty string, so:

  - nomarchy.toggles.suspend = false; still showed "Suspend" in the
    system menu (the condition is "!= false", so empty != false → true).
  - nomarchy.toggles.screensaver = false; still launched the screensaver
    on hypridle's 150s timeout (the gate "== false" never hit on empty,
    so the early-exit was skipped).

Both toggles documented in docs/OPTIONS.md were vacuous in practice.
2026-05-21 20:13:34 +01:00
Bernardo Magri
72443fd69f fix(waybar): drop 4 broken per-palette style.css overrides
themes/{catppuccin,lumon,nord,retro-82}/style.css fully replaced the
default style.css (no @import) but defined only 2–14 lines — just
@define-color declarations and, for nord, a minimal window#waybar block.
The default style ships ~110 lines covering #workspaces, #tray, #cpu,
#custom-nomarchy's Nomarchy-font override, margins/padding, the indicator
.active states, etc. So picking any of those four palettes produced a
waybar with zero structural styling.

The default style at features/desktop/waybar/config/style.css already
@imports ../nomarchy/current/theme/waybar.css — which themes/engine/
files.nix:30-34 generates with @background/@foreground/@accent from the
active palette. So removing the broken overrides restores per-palette
colors via the default-style path. summer-day and summer-night are kept
because their 100+-line style.css files are intentional, self-contained
visual redesigns (the case the themes/engine/loader.nix:76-79 comment
explicitly carves out for "themes that need significantly different
styling").
2026-05-21 20:07:25 +01:00
Bernardo Magri
641ab0cfb0 chore(hyprland): drop two dead bindings files in default/hypr/
bindings.conf was explicitly labeled "Deprecated bindings file. New
installations include everything directly." and was sourced by nothing.
plain-bindings.conf referenced \$terminal/\$browser/\$fileManager/\$music/
\$messenger/\$passwordManager — Hyprland variables that aren't defined
anywhere in the loaded config tree — and was likewise sourced by nothing.
Both files have been superseded by features/desktop/hyprland/config/
bindings.conf (the user-overrideable, mkDefault-deployed one at
~/.config/hypr/bindings.conf) and the entries already inside
default/hypr/bindings/{utilities,media,clipboard,tiling-v2}.conf.

Regenerated docs/SCRIPTS.md; the diff drops the stale plain-bindings.conf
callers and incidentally corrects four scripts whose Origin column was
out of date after they moved from core/system/scripts/ to
features/scripts/utils/ (nomarchy-env-update, nomarchy-pkg-add,
nomarchy-pkg-remove, nomarchy-preflight-migration).
2026-05-21 20:03:09 +01:00
Bernardo Magri
0297ec268f fix(hyprland): source the 9 unwired window-rule files in apps.conf
9 of the 17 .conf files under core/home/config/nomarchy/default/hypr/apps/
were deployed but never sourced. apps/system.conf carried the load-bearing
"tag +floating-window" rule that the bluetui/impala/btop/satty/screensaver
classes rely on, plus the "fullscreen, class:org.nomarchy.screensaver" rule
hypridle's 150s on-timeout depends on. apps/pip.conf carried the picture-
in-picture pin/float/size rules. Neither set of rules fired today — the
screensaver came up tiled, PiP windows didn't pin, and the floating-window
helpers shipped degraded.

Sourcing all 17 unconditionally; every rule is class- or title-gated so
the conditional ones (steam, qemu, 1password, etc.) no-op cleanly when the
app isn't installed — same pattern as the already-sourced telegram /
retroarch / localsend entries.
2026-05-21 20:00:30 +01:00
Bernardo Magri
72f7e7b93d docs(roadmap): log Hyprland keymap + waybar-toggle inconsistencies
Two behavioral wrinkles found during the Pillar 8 desktop-stack sweep
that need a design decision before they can be fixed. Logged as Later
rows so the audit doesn't lose them.

1. The Hyprland Wayland keymap is hardcoded to `us` in
   `core/home/config/nomarchy/default/hypr/input.conf:3`, ignoring the
   installer-chosen layout for native Wayland apps. Fix needs either a
   templated input.conf driven by a new home option, or session-level
   `XKB_DEFAULT_LAYOUT` propagation. Either path touches the installer
   heredoc and the home modules, so not a same-PR fix.

2. `nomarchy.toggles.waybar` is exported only as an env var consumed
   by the runtime toggle script. The Nix module always sets
   `programs.waybar.enable = lib.mkDefault true`, so the toggle is
   session-only — waybar comes back on every rebuild/reboot.
   Inconsistent with `toggles.idle` which correctly gates
   `services.hypridle.enable`. Needs a behavioral call (persistent
   gate vs intentional runtime-only with a clearer name).
2026-05-19 20:24:27 +01:00
Bernardo Magri
20de3d4f97 chore(hyprland): delete orphan config files + share-picker dir
Six unreferenced files surfaced under features/desktop/hyprland/config/
during the Pillar 8 sweep:

- `looknfeel.conf` and `autostart.conf` were deployed to ~/.config/hypr/
  but never sourced by nomarchy.conf. The substantive versions live in
  core/home/config/nomarchy/default/hypr/ and are sourced from there.
  Removed the deployment lines in features/desktop/hyprland/default.nix
  alongside the file deletes.
- `hyprlock.conf`, `hyprsunset.conf`, `xdph.conf` weren't deployed at
  all and weren't referenced anywhere. Pure leftovers.

The entire `features/desktop/hyprland-preview-share-picker/` directory
was also orphan: no `default.nix`, no Nix module imports the
`config.yaml`. Only mention was inside the (now-deleted) `xdph.conf`.
Deleted the directory.

No behavioral change — these files weren't being used. Just removes
dead surface that confuses contributors looking for the "real" config
location.
2026-05-19 20:24:16 +01:00
Bernardo Magri
2a301a049f fix(mako): deploy themed config to ~/.config/mako/config
`core/home/config/nomarchy/default/mako/core.ini` defines the Nomarchy
notification UX — urgency rules, app filters (Spotify silenced),
do-not-disturb mode, and button handlers for "Setup Wi-Fi" / "Update
System" / "Learn Keybindings" notifications. The file was deployed via
the bulk `nomarchy/` dir to
`~/.config/nomarchy/default/mako/core.ini`, but mako reads
`~/.config/mako/config` by default and `autostart.conf` launches it
without `--config`. So mako ran with stock defaults and the entire
themed UX was inert.

Added an explicit `xdg.configFile."mako/config".source` line in
core/home/configs.nix pointing at the existing themed file. mako now
picks up the Nomarchy rules out of the box.

Found during Pillar 8 audit of the desktop stack.
2026-05-19 20:24:06 +01:00
bd7e5a5706 Merge pull request 'wave/qa-core-system' (#3) from wave/qa-core-system into main
Reviewed-on: #3
2026-05-19 19:17:22 +01:00
Bernardo Magri
af8fa321ff docs(roadmap): log uwsm-in-virtualization module placement (Later)
core/system/virtualization.nix wires `programs.uwsm` + the Hyprland
session config at the top of the file — loaded unconditionally on every
install, with no actual relationship to libvirt/docker. Cosmetic
mislocation, not a behavior bug; logged as a Later row so it can be
fixed in a dedicated session module without growing this audit PR.

Found during Pillar 8 audit of core/system modules.
2026-05-19 19:13:47 +01:00
Bernardo Magri
6238f41e43 fix(hibernate): mkDefault on HandlePowerKey / IdleAction / IdleActionSec
These three settings.Login fields were set at default priority, so a
downstream system.nix that wrote (e.g.) `services.logind.settings.Login.HandlePowerKey = "poweroff"`
would collide with Nomarchy's value instead of overriding it. Same
mkDefault treatment as the other lid-switch settings in this block.

Found during Pillar 8 audit of core/system modules.
2026-05-19 19:13:23 +01:00
Bernardo Magri
fb4d5d7acc chore(schema): drop orphan features.makima
`lib/state-schema.nix` declared `system.features.makima = false` but
the field was never wired anywhere: no matching option in
core/system/options.nix, no consumer in core/system/state.nix, no
references in the wider tree. Schema-only ghost — removed.

Found during Pillar 8 audit of core/system modules.
2026-05-19 19:13:23 +01:00
Bernardo Magri
99a6c7d547 fix(impermanence): user must match created account, not hardcoded "nomarchy"
The persistence block at core/system/impermanence.nix:75 read
`users.nomarchy = { directories = [...]; }` — the username was a
literal, not a reference. For any user not literally named "nomarchy"
the block was silently inert and ~/.ssh, ~/.gnupg, ~/.local/share/keyrings,
Documents, Downloads, Pictures, Videos, Projects were wiped on every boot.

Adds `nomarchy.system.impermanence.user` (str, default "nomarchy") and
uses it via `users.${cfg.user}`. The installer now writes the chosen
username alongside `enable` and `mainLuksName` so impermanence installs
with non-default usernames are correct out of the box.

docs/OPTIONS.md: fixes the wrong path on the impermanence row
(documented `impermanence.enable`, real option is
`nomarchy.system.impermanence.enable`) and adds entries for
`mainLuksName` and `user`.

Found during Pillar 8 audit of core/system modules.
2026-05-19 19:13:23 +01:00
Bernardo Magri
85ef8745d7 chore: delete orphan config assets + log chromium/templates concerns
Two unreferenced asset files removed; two larger concerns deferred to
roadmap rows because they need more thought than a focused audit
allows.

Deleted:
- `features/apps/alacritty/config/alacritty.toml` — the alacritty
  module uses `programs.alacritty.settings` (Nix attrset) exclusively;
  nothing references the on-disk file. The neighbouring (already-empty)
  `themes/` directory goes with it.
- `themes/templates/mako.ini.tpl` — no script reads it.

Deferred to ROADMAP "Later":
- `features/apps/chromium/Default/Preferences` is deployed as a Home
  Manager symlink into chromium's mutable profile directory. Either
  silently replaced on first save or silently failing to write —
  either way the static defaults don't survive. The actual chromium
  theming work happens via managed policies in
  core/system/browser.nix. Needs chromium-internals knowledge to
  decide whether to remove or rework, so flagged rather than
  unilaterally deleted.
- `themes/templates/*.tpl` (the remaining 10 templates) are also
  apparently orphan — deployed via xdg.dataFile but unconsumed by any
  script. Likely vestigial from a pre-stylix templating system.
  Logged as a separate row to decide deletion vs documentation as
  user-reference assets.

Found during Pillar 8 audit of features/apps.
2026-05-19 19:04:56 +01:00
Bernardo Magri
b82954a7b5 fix(options): drop dead skipVsCodeTheme + 4 themeLoader.apps toggles
Two clusters of documented-but-non-functional options surfaced during
the Pillar 8 audit, both setting toggles that have zero runtime effect.

1. `nomarchy.toggles.skipVsCodeTheme` was declared in
   core/home/options.nix, defaulted from lib/state-schema.nix, and
   surfaced as `NOMARCHY_TOGGLE_SKIP_VSCODE_THEME` env var in
   features/scripts/default.nix — but `features/apps/vscode.nix` always
   sets `workbench.colorTheme` unconditionally, and no script reads the
   env var. Setting the toggle to true did nothing. Removed from
   options, schema, state, env-var export, and OPTIONS.md.

2. `nomarchy.themeLoader.apps.{waybar,mako,kitty,alacritty}` were
   declared in themes/engine/loader.nix but only `btop` is actually
   wired (line 87 gates the per-theme btop.theme deploy). The other
   four had no consumer. The actual theming pipeline for those apps is
   elsewhere: waybar themes inline from `colorScheme` in waybar.nix;
   kitty and alacritty are themed by stylix targets in
   themes/engine/stylix.nix; mako has no theme integration at all.
   Removed the four dead options + updated OPTIONS.md to list only
   btop with a note about where the other apps' theming lives.
2026-05-19 19:04:25 +01:00
Bernardo Magri
66c98949ab chore(features): drop orphan userPackages reader
`features/default.nix` had a let-block that read
`~/.config/home-manager/user-packages.json` at eval time via
`builtins.pathExists` + `builtins.readFile`, parsed it as JSON, and
filtered to valid pkgs — then never appended the result to
`home.packages` or anywhere else. The `userPackages` variable was
completely orphan.

Two problems with the dead code: (1) it was an undocumented hidden
mechanism (no docs mentioned `user-packages.json`), (2) it made flake
evaluation impurely depend on a user's home directory for no payoff —
flake outputs would silently differ between machines depending on the
presence of that file, even though nothing in the build used it.

Removed the let-block entirely. The nomarchyLib import stays.

Found during Pillar 8 audit of features/apps.
2026-05-19 19:04:25 +01:00
07e2d5c51c Merge pull request 'fix(home): remove dead behavior options, reserve overrides API' (#4) from wave/qa-core-home into main
Reviewed-on: #4
2026-05-19 18:49:22 +01:00
2529ca114f Merge branch 'main' into wave/qa-core-home 2026-05-19 18:49:15 +01:00
94927952db Merge pull request 'chore(lib): drop dead helpers, document schema boundary' (#2) from wave/qa-lib-schema into main
Reviewed-on: #2
2026-05-19 18:48:30 +01:00
0930458418 Merge pull request 'wave/qa-first-boot' (#1) from wave/qa-first-boot into main
Reviewed-on: #1
2026-05-19 18:48:02 +01:00
Bernardo Magri
95101fda3f fix(sddm): default autoLogin off, not on with hardcoded "nomarchy"
`themes/engine/sddm.nix` defaulted `services.displayManager.autoLogin`
to `enable = true; user = "nomarchy";` (both mkDefault). The installer
flow overrode both with the real username at normal priority, so this
was invisible there — but a hand-migrated user (per docs/MIGRATION.md)
who imported `nomarchy.nixosModules.system` without setting
`autoLogin.user` would auto-login as a nonexistent "nomarchy" user and
SDDM would error. `docs/MIGRATION.md` even documented the override as a
post-import chore.

Flipped the default to `enable = lib.mkDefault false`. Installer
generates `enable = true` directly so its flow is unchanged. Migration
flow now gets the safe default — opt-in instead of opt-out — and the
docs row is updated to reflect the new shape.

The hardcoded "nomarchy" username fallback for `autoLogin.user` is the
same class of bug as the impermanence persistence block was. A future
roadmap row to consolidate "primary user" across impermanence,
autoLogin, and any future modules might be worthwhile, but it's
deferred — this commit is the immediate fix.

Found during Pillar 8 audit of first-boot UX.
2026-05-19 18:46:41 +01:00
Bernardo Magri
6e0d17b859 fix(welcome): drop Step 4's dead starter home.nix generation
`nomarchy-welcome` wrote a "starter" `~/.config/home-manager/home.nix`
for users without one. Two problems:

1. Wrong path. The installer-generated canonical home.nix lives at
   `/etc/nixos/home.nix` and is imported via the flake (both
   home-manager.users and the standalone homeConfigurations). Nothing
   in the installer flow ever reads `~/.config/home-manager/home.nix`
   — it's a dead file.
2. Broken content. The starter is missing `home.username`,
   `home.homeDirectory`, `home.stateVersion`, and doesn't import
   `nomarchy.nixosModules.home`. Even on a hand-migration path it
   wouldn't evaluate as a standalone HM config.

So in the installer flow it's dead, and in the migration flow it's
broken. Removed Step 4 entirely. The git-init step (was Step 5) is
now Step 4. Hand-migrated users follow `docs/MIGRATION.md`, which has
the correct home.nix template.

Found during Pillar 8 audit of first-boot UX.
2026-05-19 18:46:30 +01:00
Bernardo Magri
27d1506b54 chore(lib): drop dead helpers, document schema boundary
Two unused helpers and a missing comment in the lib/ surface, found
during the Pillar 8 sweep.

- `readState` in `lib/default.nix` was exported but has no external
  callers — only `readHomeState` and `readSystemState` use it
  internally. Removed from the export list; the function stays in the
  let-block (still wraps the two public readers).

- `getWithDefault` in `lib/state-schema.nix` was a complete dead
  function: declared as a path-walking fallback helper but never called
  anywhere in the tree. core/{system,home}/state.nix use inline
  `togglesState.<key> or schema.<scope>.<key>` instead. Removed.

- Added a header comment to `lib/state-schema.nix` explaining the
  schema's boundary — it lists every state.json field consumed by a
  Nix option, but state.json may also hold runtime-only fields
  (`welcome_done` from `nomarchy-welcome`) that are intentionally
  off-schema because no Nix option reads them. Future readers will
  otherwise think welcome_done is an orphan.

Logged a Later-column roadmap row for consolidating `flake.nix`'s
palette/themeNames re-imports with `nomarchyLib` so the theme list has
one source of truth instead of two.
2026-05-19 18:28:54 +01:00
Bernardo Magri
90f07ae75c fix(home): remove dead behavior options, reserve overrides API
Two declared-but-non-functional option subsystems in core/home were
documented in OPTIONS.md and actively misleading users.

1. `nomarchy.behavior.hyprland.{bindings,input,windowRules,autostart}`
   were declared in core/home/behavior.nix with a `behaviorConfigs`
   mapping let-binding — both completely unread elsewhere in the tree.
   The actual hypr/*.conf files are deployed by
   features/desktop/hyprland/default.nix with `lib.mkDefault`,
   unconditionally. Setting `behavior.hyprland.bindings = false` had
   zero effect. OPTIONS.md's "Disable Nomarchy's default Hyprland
   keybindings" example was a lie. Removed the four dead options,
   deleted behavior.nix entirely, dropped the import from
   core/home/default.nix, and rewrote the OPTIONS.md example to use
   `xdg.configFile."hypr/bindings.conf".source = ./mine` (which
   actually works against the existing `lib.mkDefault` priority).

2. `nomarchy.overrides.{enable,paths}` advertised a file-based override
   loader that doesn't exist. The module created
   `~/.config/nomarchy/overrides/{hypr,waybar,apps}` directories and
   wrote a README claiming "place files here to override upstream
   defaults" — but `getOverrideOrDefault` was never called and `paths`
   was never populated. Rewrote core/home/overrides.nix to keep just
   the option declarations (so configs that already set these still
   evaluate) and marked them clearly as reserved/no-op in OPTIONS.md.
   Removed the misleading README write and dir-creation. Logged a
   Next-column roadmap row for implementing the loader properly.

While here:
- Clarified `nomarchy.configOverrides` (the *working* bulk-redirect
  mechanism) vs `nomarchy.overrides.*` (the reserved one) in OPTIONS.md
  — they're different things and the "See Overrides below" link was
  pointing at the broken subsystem.
- Fixed OPTIONS.md `nomarchy.iconsTheme` / `nomarchy.isLightMode`
  default text — both are derived from the active theme in
  core/home/state.nix, not the static literals the docs claimed.
- Updated docs/AGENT.md §2 and docs/STRUCTURE.md to reflect the
  behavior.nix removal and the overrides.nix reservation.

Found during Pillar 8 audit of core/home modules.
2026-05-19 18:08:58 +01:00
Bernardo Magri
bfd95cb40b docs(roadmap): mark Pillar 5 preset rows as Shipped
Laptop, Desktop, Accessibility, and Gaming presets all shipped on
2026-04-26 but were still tagged (Next). Reorders the pillar so the
two genuinely open items (dGPU auto-detect, Surface support) lead.
2026-05-19 17:28:16 +01:00
Bernardo Magri
9283403d8f docs(roadmap): add Pillar 8 QA audit + clean stale Pillar 4 rows
Pillar 3 audited script existence; Pillar 8 audits feature behavior.
Adds a per-component sweep methodology (10 components, one PR each on
wave/qa-<component>) and lists it on the Now board so the next session
can pick it up without re-deriving scope.

Cleanup pass on Pillar 4: removes two "(Now)" entries (software-profile
multi-select, form-factor → laptop preset) already in the Shipped log,
and promotes the two remaining open items ("What's installed?" summary,
non-LUKS branch) to the Now board.
2026-05-19 17:26:22 +01:00
Bernardo Magri
7bf4c3c637 fix(theme): set default to summer-night and fix scripts on live ISO
- Update lib/state-schema.nix to default both home and system themes to 'summer-night'.
- Fix 'nomarchy-theme-list' and 'nomarchy-theme-set-templates' to resolve themes and templates from '~/.local/share/nomarchy' instead of the obsolete '$NOMARCHY_PATH' (fixing failures on Live ISO).
- Update 'nomarchy-welcome' to properly convert Title Case theme display names back to kebab-case identifiers and add input validation to prevent crashes.
- Fix installer impermanence symlink by using a relative path ('../persist/etc/nixos'), ensuring it resolves during 'nixos-install' both inside and outside the chroot.
- Deploy '~/.XCompose' symlink via Home Manager and add 'nomarchy-restart-xcompose' to the menu.
- Relocate 'Nomarchy.ttf' to 'core/branding/' and move user-level scripts ('pkg-add', 'pkg-remove', 'env-update', 'preflight-migration') to 'features/scripts/utils/' to align with the distro architecture.
- Remove obsolete '$NOMARCHY_PATH' exports and redundant 'bashrc' template.
- Export theme templates via 'xdg.dataFile' for script accessibility.
2026-05-18 21:22:39 +01:00
Bernardo Magri
ec6046793e fix(installer): hardware-db references real modules + add ROG Ally + CI lint
Audited every entry in `installer/hardware-db.sh` against
`inputs.nixos-hardware.nixosModules` and found **21 of 43 entries (49%)
referenced modules that don't exist** in the upstream attribute set —
those installs would fail at eval time with "attribute not found"
errors on real hardware. Specifically:

  - Framework 13 per-gen: nixos-hardware uses `framework-11th-gen-intel`,
    not `framework-13-11th-gen-intel`. Fixed all four generations.
  - Framework 13 AMD AI 300: `framework-amd-ai-300-series` (no "13-").
  - Framework Intel Core Ultra: added `framework-intel-core-ultra-series1`.
  - Framework 16 AMD AI 300: added `framework-16-amd-ai-300-series`.
  - Framework generic fallback now uses the `framework` umbrella module.

  - ThinkPad X1 Carbon: modules are `lenovo-thinkpad-x1-Nth-gen`,
    not `-x1-carbon-genN`. Fixed gens 6/7/9/10/11; added X1 Nano.
  - ThinkPad P14s: requires arch+gen suffix; switched to the AMD gen3/4/5
    modules (the prior `lenovo-thinkpad-p14s` had no attribute).

  - Surface Pro 6/7/8/10: all share `microsoft-surface-pro-intel`. Pro 9
    keeps its dedicated module. Pro 3 fixed to `-pro-3`. Surface Book
    2/3 and Intel-based Surface Laptop 3/4/5: no nixos-hardware module
    — rows dropped; generic chassis+cpu+gpu detection still emits
    sensible `common-pc-laptop`.

  - ASUS ROG Strix G513 → `asus-rog-strix-g513im` (correct attr name).
  - ASUS ROG Zephyrus GA403 didn't exist — dropped. Added `ga402x`,
    `gu603h`, `g533zw`.
  - ASUS Zenbook generic `asus-zenbook-ux` was non-existent — dropped
    (too vague; available modules are per-model like `asus-zenbook-ux481`).

  - Dell Latitude 5400 / 7480: no modules — replaced with the existing
    `dell-latitude-7420`, `7430`, `7490`.

Added:

  - ROG Ally / Ally X support (`asus-ally-rc71l` for `RC71L`,
    `RC72LA`, and the "ROG Ally" product string). nixos-hardware
    currently ships one module for both revisions.

Documented (in a footer comment) the devices nixos-hardware doesn't
cover so they're known-unsupported rather than accidentally missing:

  - Valve Steam Deck → Jovian-NixOS as a separate flake input.
  - Snapdragon X laptops → aarch64 only; Nomarchy installer is x86_64.
  - Raspberry Pi → same as above.

Bug discovered along the way: the DB's pipe-separated row format
collides with bash regex alternation. A row like
`Microsoft|Surface Pro (10|8|7|6)|_|module` parses as 7 fields, with
"7" extracted as the module name. Surface Pro variants are now one
row per version.

CI gate added (`.forgejo/workflows/check.yml`): a new step extracts
every 4th-pipe-field from `HARDWARE_DB` and `comm -23`s it against
`inputs.nixos-hardware.nixosModules`. Any future entry pointing at a
non-existent module fails CI with a clear error. Closes the regression
class entirely.

Verified locally: bash -n + shellcheck --severity=error pass on
hardware-db.sh; the CI step's exact commands pass against the new DB.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 18:31:48 +01:00
Bernardo Magri
2b6d452509 fix: nomarchy-manual opens local README, not an Omarchy URL
The script hardcoded `xdg-open https://learn.omacom.io/2/the-nomarchy-manual`
— an upstream Omarchy page. Users hitting "Help → Manual" in nomarchy-menu
were sent to an unrelated site, and there's no nomarchy.org canonical
docs URL to point at instead.

Now opens `$HOME/.local/share/nomarchy/README.md`, which lives on every
installed system (per SKILL.md's "Out of Scope" note about
`~/.local/share/nomarchy/`) and links every doc in `docs/`. Falls back
to a notify-send "run nomarchy-update?" message if the source tree
isn't synced.

Pillar 6 entry in docs/ROADMAP.md updated to (Shipped).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 18:24:19 +01:00
Bernardo Magri
ac846f4b03 docs: STRUCTURE.md root listing + Pillar 6 reality-check
Two stale-doc cleanups in one commit. Both surfaced during the
post-Phase-B audit pass.

1. `docs/STRUCTURE.md` "Root Directory" listed three files that don't
   exist anywhere in the tree:
   - `GEMINI.md` (replaced long ago by `docs/AGENT.md`)
   - root-level `STRUCTURE.md` (this file actually lives in `docs/`)
   - `TODO.md` (long since replaced by `docs/ROADMAP.md`)

   Replaced with the actual root layout (flake.nix, flake.lock,
   README.md, .forgejo/, .githooks/) plus a `docs/` sub-tree that
   names every doc in the directory — the missing pieces the deleted
   bullets were trying to point at, now correctly located.

2. `docs/ROADMAP.md` Pillar 6 had three "Next" bullets that already
   shipped on 2026-04-26 (the welcome wizard, TROUBLESHOOTING.md, and
   the docs-index goal — README.md now links every doc in `docs/`).
   Moved all three to `(Shipped)`.

   Also rewrote the `nomarchy-manual` bullet — "orphaned reference
   today" was stale (the script is called from nomarchy-menu and
   nomarchy-theme-install per docs/SCRIPTS.md). The real remaining
   issue is its hardcoded `xdg-open https://learn.omacom.io/...` —
   an Omarchy URL that opens an unrelated upstream page when a user
   triggers the menu's Help entry. The bullet now names that
   specifically.

No code touched; doc-only.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 18:21:36 +01:00
Bernardo Magri
03968e5d0d fix(installer): generate state.json from lib/state-schema.nix
Closes the last source-of-truth split after the state-defaults
centralization batches. The installer's heredoc was the only remaining
place that hardcoded the state.json literal — adding a default to the
schema previously required a parallel edit here, and silent drift was
exactly the bug class we kept fixing.

Before:

  cat > /mnt/etc/nixos/state.json <<JSON_EOF
  {
    "theme": "nord",
    "timezone": "${_state_tz}",
    "dns": "DHCP",
    ...
  }
  JSON_EOF

After:

  nix eval --impure --raw --expr "
    let
      flake = builtins.getFlake \"$NOMARCHY_REPO\";
      lib = flake.inputs.nixpkgs.lib;
      schema = import \"$NOMARCHY_REPO/lib/state-schema.nix\"
                 { inherit lib; };
      state = schema.system // { timezone = \"$_state_tz\"; };
    in builtins.toJSON state
  " | nrun jq '.' > /mnt/etc/nixos/state.json

Uses the flake's own pinned `inputs.nixpkgs` (matching what the rest of
Nomarchy resolves against), so the schema evaluates with the same `lib`
the consumer modules see. `nrun jq` pretty-prints for human inspection.

Behavioural notes:
- Output is identical to the old heredoc modulo alphabetical key
  ordering — `builtins.toJSON` sorts keys, the heredoc was in
  declaration order. Toggle scripts read/write via `jq` so it's
  invisible to them.
- Dry-run path unchanged. `execute_dry_run` already bind-mounts a fake
  /mnt for the generator; the generator's absolute paths still resolve.
- New schema fields show up automatically on the next install; no
  parallel edit needed.
- `bash -n` + `shellcheck --severity=error` clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 18:18:25 +01:00
Bernardo Magri
d264371b46 fix: complete hybridGPU wiring + make state-derived options overridable
Two related fixes that together close the "minimal wiring" gap behind
`nomarchy.system.features.hybridGPU`.

1. Complete the NVIDIA driver stack inside hardware.nix's hybridGPU
   mkIf block.

   Before: `hybridGPU = true` enabled supergfxd and... that was it.
   supergfxd manages mode switching by black/unblacklisting the nvidia
   kernel module, but without the rest of the NVIDIA stack actually
   loaded the dGPU has no driver to drive. Hyprland/Wayland silently
   stayed on the iGPU regardless of mode.

   After: hybridGPU=true also wires
     services.xserver.videoDrivers = ["nvidia"]   (loads the driver
                                                   under Wayland too)
     hardware.graphics.{enable,enable32Bit}
     hardware.nvidia.modesetting.enable           (required for
                                                   Wayland)
     hardware.nvidia.powerManagement.enable
     hardware.nvidia.package = config.boot.kernelPackages
                                      .nvidiaPackages.stable
     boot.kernelParams += "nvidia-drm.modeset=1"

   All wired with lib.mkDefault so a downstream system.nix can pin a
   beta driver, flip to the open kernel module, or set
   `hardware.nvidia.prime.{offload.enable, intelBusId, nvidiaBusId}`
   for render-offload. The bus IDs are per-machine (find via
   `lspci -D`) so they stay user-supplied; docs/OPTIONS.md has the
   full recipe.

2. Add lib.mkDefault to every state.json-derived assignment in
   core/system/state.nix and core/home/state.nix.

   Same priority bug on both sides: assignments like
   `features.hybridGPU = systemState.features.hybridGPU or false`
   landed at default priority. A downstream system.nix saying
   `nomarchy.system.features.hybridGPU = true` would then conflict
   with the state-derived value at the same priority, and Nix would
   refuse the merge with "conflicting definition values" — the
   user's override couldn't take effect.

   Verified by an explicit eval: extending the default nixosConfig
   with `nomarchy.system.features.hybridGPU = true` now resolves
   cleanly and the full driver stack engages.

   Side-effect: core/system/state.nix now reads from
   lib/state-schema.nix like the home side does, completing the
   schema-centralization started two batches ago.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 18:12:09 +01:00
Bernardo Magri
9c672953bc fix(installer): pre-flight resume polish (4 gaps)
Four resume-flow papercuts in `installer/install.sh` that hurt the
"interrupted install" path the most.

1. `--resume` with no state file is no longer silent.
   The most common operator confusion: reboot the live ISO, forget
   /tmp/ is tmpfs, re-run with --resume, watch the installer start
   over from scratch without saying anything. Now: loud error, tmpfs
   explanation, exit 1.

2. Validate the saved TARGET_DRIVE still exists on resume.
   Live ISO USB sticks get unplugged between sessions, dev hosts
   sometimes have non-deterministic /dev/sdX numbering. Without the
   guard the install proceeds and fails with cryptic disko / mount
   errors deep in execute_installation. Now we fail at load_state
   with the actual reason and a clean recovery path.

3. Resume now shows what's being resumed.
   `save_state` stamps an ISO-8601 timestamp; `load_state` prints
   "Resumed from <path> (saved Xm ago)" plus a "Target: /dev/X → user
   @ host" summary line. Lets the user Ctrl-C before any destructive
   prompt fires if they're resuming onto the wrong machine.

4. `--help` documents the tmpfs limitation.
   Saved state lives in /tmp/ which is tmpfs on the live ISO; --resume
   only works within the same boot. The man-page now says so instead
   of letting users discover it the hard way.

`format_age` is the one new helper — pretty-prints "Xs/Xm/Xh Ym/Xd"
relative to now, falls back to the raw timestamp if `date -d` can't
parse the input. shellcheck --severity=error passes.

Out of scope (potential future work):
- Persistent state across reboots (would need a writable USB / external
  drive — chicken/egg with the installer setting up the only persistent
  storage in the first place).
- `--show-state` flag to inspect a saved file without running.
- State-file schema versioning.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 18:00:02 +01:00
Bernardo Magri
7fa909ddf4 fix: centralize state defaults via lib/state-schema.nix
Kills a recurring bug class: state defaults previously lived in three
parallel places that drifted apart over time.

  - lib/state-schema.nix          (the canonical schema, referenced
                                   nowhere except a description string)
  - core/system/options.nix       (default = "..." clauses on options)
  - core/home/options.nix         (same, on home options)
  - core/home/state.nix           (`or "..."` fallbacks for state.json reads)

When `state.json` is missing a key, three files have to agree on the
fallback. They keep silently drifting:

  - The OOTB QA audit shipped fixes for this pattern.
  - Earlier this session, `chore: switch default theme summer-night → nord`
    fixed core/system/options.nix and core/home/state.nix — but missed
    core/home/options.nix, which still defaulted nomarchy.theme to
    "summer-night". Every consumer of the home option
    (features/default.nix, vscode.nix, waybar, hyprland, theme engine)
    resolved to the wrong theme when state.json was blank.

This change:

  - Imports lib/state-schema.nix into all three consumers and replaces
    every hardcoded default with `schema.<scope>.<key>`.
  - Fixes the lingering nomarchy.theme = "summer-night" home-side bug as
    a side-effect.
  - Touches roughly 25 literals across the three files.

Verified `nix flake check --no-build` passes and every centralized value
evaluates to the exact literal it previously had. Off-schema option-only
defaults (isLightMode, formFactor, cursor.*, iconsTheme, keyring.enable,
etc.) are left hardcoded — they have no state.json counterpart, so
there's no source-of-truth split to resolve.

Out of scope (follow-up):
  - Have installer/install.sh generate /mnt/etc/nixos/state.json from
    the schema instead of hardcoded JSON — would close the last
    split-brain surface (the installer can still drift from schema).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 17:52:47 +01:00
Bernardo Magri
5ddb15ffef ci: add Forgejo Actions workflow (eval + lint)
Pillar 7 first step. `.forgejo/workflows/check.yml` runs on every push
to main and every PR. Three sequential checks in one job:

1. `nix flake check --no-build`
   Catches eval regressions: broken option references, missing imports,
   stale module argument shapes. The same command AGENT.md tells humans
   to run by hand before declaring a change done.

2. `bash -n` + `shellcheck --severity=error` over every `nomarchy-*`
   bash script.
   Mirrors what `.githooks/pre-commit` does locally, but across the
   whole tree on every push — so a branch that bypasses the hook (via
   `--no-verify` or a fresh clone without `core.hooksPath` set) still
   gets gated. Severity is capped at error to match the hook; the long
   tail of style/info warnings can be cleaned up incrementally.

3. `docs/SCRIPTS.md` drift check.
   Regenerates the audit doc to a temp file and `diff`s against the
   committed version. Fails loudly with the fix command if a script
   add/remove/rename didn't include the regeneration step.

Dry-run results on the current tree:
- `nix flake check --no-build`: pass (only pre-existing warnings).
- shellcheck across 159 scripts at severity=error: pass.
- SCRIPTS.md drift: clean.

Activation:
Forgejo Actions isn't enabled on the repo yet, so the workflow lands
dormant. To activate: enable Actions on the repo in Forgejo's settings
and register a `forgejo-runner` on any Docker-capable Linux host. The
workflow uses `ubuntu-latest` and installs Nix itself via
`DeterminateSystems/nix-installer-action`, so no special runner image
is needed.

Deferred to a follow-up batch (needs binary cache infra):
- Building ISOs in CI (`nomarchy-installer`, `nomarchy-live`, default).
- Release pipeline (`vYY.MM.x` tags publishing ISOs as artifacts).
- `nixosTest` per palette with golden-image screenshot diffs.

`docs/STRUCTURE.md` now documents `.forgejo/` and `.githooks/` so future
agents and contributors can find both.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 17:34:05 +01:00
Bernardo Magri
46738c3663 chore(audit): final Phase B batch — close out unused? cluster
Pillar 3 Phase B, batch 4 (final). Triages the last 13 `unused?` rows:
five deletes and eight SKILL.md surfacings.

Deleted (no callers anywhere, work duplicated inline or marginal value):
- `nomarchy-restart-hyprctl` and `nomarchy-restart-mako`: stale comments
  claimed "used by theme switching" but no Nomarchy script calls them.
  Theme-set and refresh paths call `hyprctl reload` / `makoctl reload`
  directly (see nomarchy-refresh-hyprland).
- `nomarchy-restart-tmux`: 3-line pgrep+source-file wrapper. Users can
  `tmux source-file ~/.config/tmux/tmux.conf` themselves.
- `nomarchy-battery-present`: the battery monitor reads
  `/sys/class/power_supply/BAT*` inline; the helper never got wired in.
- `nomarchy-sudo-keepalive`: intended to be `source`d from longer-running
  scripts (nomarchy-update, etc.) but nothing sources it. Resurrect from
  git history if a future caller actually needs it.

Surfaced in SKILL.md (now tagged `kept` by the audit):
- Themes: `nomarchy-theme-{remove,refresh,bg-install}`
- System: `nomarchy-sudo-{passwordless-toggle,reset}`,
  `nomarchy-restart-trackpad` (intel_quicki2c THC reload — a real laptop
  bug fix worth documenting)
- New Virtualization section: `nomarchy-windows-vm {install,launch,stop,status}`
- Enriched Troubleshooting's generic `nomarchy-refresh-<app>` example with
  literal `nomarchy-refresh-fastfetch` so the audit catches it.

Verified `nix flake check --no-build` still passes and zero callers
reference the deleted scripts.

**Phase B is now complete.** Final audit state: 164 → 159 scripts, all
tagged `kept`, `unused?` = 0, missing references = 0. The audit table is
now a clean reference of what Nomarchy ships, not a triage backlog.
Logged in `docs/ROADMAP.md` Shipped.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 17:19:57 +01:00
Bernardo Magri
9be4363f4b chore(audit): triage webapp/tui/voxtype install-remove pairs
Pillar 3 Phase B, batch 3 — Batch A of the unused? clusters.

Deleted two dead webapp URI handlers:
- `nomarchy-webapp-handler-hey`
- `nomarchy-webapp-handler-zoom`

Neither was registered as a MimeType handler anywhere — a grep across
`*.desktop` files in `core/`, `features/`, `themes/`, `installer/`, and
`hosts/` returned zero matches. Without a `.desktop` registration the
system never routes `mailto:`/`zoom:`/`zoomus:` URIs to them, so the
handlers were unreachable code.

Kept the six remaining install/remove pairs (they're real CLI tools, just
unwired into any menu) and surfaced them in `SKILL.md` "Common Tasks" so
AI assistants can discover them on user request and the audit tags them
`kept`:
- Custom App Launchers: webapp-{install,remove,remove-all},
  tui-{install,remove,remove-all}
- Voice dictation: voxtype-{install,remove,status}

Menu-wiring these (e.g. a "Setup → Apps" submenu in nomarchy-menu) is a
separate Pillar 6 onboarding job, not scoped here.

Regenerated `docs/SCRIPTS.md` — script count 166 → 164, `unused?` 21 → 13.
Logged in `docs/ROADMAP.md` Shipped.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 17:13:39 +01:00
Bernardo Magri
f93eb7435f chore(audit): delete NixOS-irrelevant Omarchy port scripts
Pillar 3 Phase B, batch 2. Five `unused?` scripts that either duplicate
NixOS-native facilities or reference infrastructure Nomarchy doesn't
ship. All five had no callers anywhere in the tree.

- `nomarchy-rollback`: ran `nixos-rebuild rollback` after listing
  `snapper` snapshots. NixOS already exposes the previous generation in
  the boot menu and `nixos-rebuild --rollback`; Nomarchy uses
  impermanence, not snapper.
- `nomarchy-snapshot`: wrapped `snapper create/restore`. Same reason —
  snapper isn't part of Nomarchy. The script's "nomarchy-update can use
  this" comment never came true; nomarchy-update has no reference to it.
- `nomarchy-migrate-state`: one-time migration from old
  `~/.config/home-manager/state.json` and `/etc/nixos/state.json` to the
  unified `~/.config/nomarchy/state.json`. The installer now seeds the
  unified file directly; no current install needs the migration.
- `nomarchy-config-direct-boot`: added an EFI boot entry for a Nomarchy
  UKI. We don't build a UKI (no references anywhere in `core/` or
  `hosts/`), so the script targeted nonexistent infrastructure.
- `nomarchy-npx-install`: generated npx wrappers in `~/.local/bin/`. An
  Arch idiom — on NixOS the path is `nix-shell -p nodejs` or a
  declarative `home.packages` entry.

Kept `nomarchy-build-iso` and `nomarchy-build-live-iso` (the user-flagged
useful build wrappers) and surfaced them in README §2 in place of the
raw `nix build` command, which both removes the audit's `unused?` flag
on them and shortens the docs.

Regenerated docs/SCRIPTS.md (171 → 166 scripts; 28 `unused?` → 21).
Logged in docs/ROADMAP.md Shipped.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 17:08:09 +01:00
Bernardo Magri
6b2c678669 chore: switch default theme from summer-night to nord
Both the system option (`core/system/options.nix:theme`) and the home-side
state evaluator (`core/home/state.nix`) defaulted to "summer-night". The
installer-written state.json now seeds "nord" (see preceding installer
commit), and `lib/state-schema.nix` already defaults to "nord". Align the
hardcoded fallbacks here so a missing or blank state file lands on the
same theme everywhere instead of a now-inconsistent split.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 17:01:29 +01:00
Bernardo Magri
ac4d66e54d fix: nomarchy-sys-update targets actual hostname, not '#default'
The installer generates `nixosConfigurations.<hostname>` (see
installer/install.sh: `nixosConfigurations.$HOSTNAME`), but the system
update script was rebuilding `.#default` and using `--impure`. The
`#default` literal worked only on dev hosts that happened to be named
"default" and silently broke every toggle script on real installs.

Now resolves `$(hostname)` at runtime and aborts with a clear error if
empty. Dropped `--impure` — the flake doesn't need it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 17:01:22 +01:00
Bernardo Magri
098cd42ac8 fix(installer): harden multi-disk LUKS, password handling, revision pinning
Several installer reliability fixes that were left uncommitted:

- Impermanence + multi-disk LUKS: disko-config.nix names the main LUKS
  mapping `crypted` for single-disk and `crypted_main` once extraDrives is
  non-empty. The impermanence rollback hook used to hardcode `crypted`,
  which made every multi-disk install fail to mount root in initrd. Added
  a `nomarchy.system.impermanence.mainLuksName` option and wired the
  installer to write the correct value into the generated system.nix
  based on the drive count.

- Password no longer cleartext in /etc/nixos: installer now hashes the
  user password with `mkpasswd -m sha-512` and emits
  `initialHashedPassword` instead of `initialPassword`. Added mkpasswd to
  the live ISO. Cleartext is unset immediately after hashing.
  USER_PASSWORD_HASH is deliberately not persisted in --resume state —
  configure_user re-prompts on resume.

- Revision pinning that actually works on the live ISO: `inputs.self`
  strips .git in the Nix store copy, so `git rev-parse HEAD` would silently
  return empty on a real install and the generated flake would track main.
  Live ISO now writes `/etc/nomarchy-rev` from `inputs.self.rev` at build
  time; install.sh reads it first, falls back to git, and aborts with a
  loud confirmation prompt if both are empty (instead of silently
  installing an unpinned system).

- Generated `/mnt/etc/nixos/state.json`: toggle scripts (nomarchy-tz-select,
  nomarchy-setup-{fido2,fingerprint}, nomarchy-toggle-hybrid-gpu,
  nomarchy-wifi-powersave) `jq` this file in place and fail hard if it
  doesn't exist. Fresh installs now ship a schema-conformant file matching
  lib/state-schema.nix.

- Unmount /mnt before exiting `finish()` regardless of reboot choice. Clean
  unmount avoids dirty BTRFS on reboot; on "no", leaving /mnt mounted
  blocked a second installer run on the same live ISO.

- Removed obsolete `installer/disko-btrfs-luks.nix` (superseded by
  `disko-config.nix` per commit 3aadc36) and dropped its dangling
  `docs/STRUCTURE.md` reference.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 17:01:15 +01:00
Bernardo Magri
158ae308cc fix(audit): close all missing-references rows in script audit
The audit's "missing references" table held 15 rows — 2 real doc bugs and
13 grep false-positives — making Pillar 3 Phase B triage noisier than it
needed to be.

- Wrote themes/engine/scripts/nomarchy-theme-next so SKILL.md's documented
  "cycle to next theme" command actually resolves.
- Scrubbed three stale `nomarchy-dev-*` references from SKILL.md (skill
  frontmatter, body, and Out-of-Scope list) — they hallucinated a workflow
  that doesn't exist and broke AI-assisted use of the skill.
- Added a line-context filter to both nomarchy-docs-scripts generators
  that drops `nomarchy-*` tokens appearing in Nix pname/derivation idents,
  /tmp/ and /etc/sudoers.d/ paths, nixosConfigurations.* / packages.*
  flake outputs, mktemp -t prefixes, systemd unit vars, ./result/bin/run-
  binaries, and docker container references.
- Added a small token-level denylist for five residual non-script
  identifiers (nomarchy-plymouth, nomarchy-sddm-theme, nomarchy-live,
  nomarchy-rev, nomarchy-windows) that survive line filtering because
  they appear as bare Nix list refs, comment backticks, or compose-heredoc
  identifiers.

Regenerated docs/SCRIPTS.md; the "Missing references" section is now
empty. Logged in docs/ROADMAP.md Shipped.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 16:58:54 +01:00
Bernardo Magri
c1895eefd4 feat: implement Pillar 8: Distro Branding
Scrubbed remaining upstream references and solidified Nomarchy's identity:
- Replaced 'Omarchy' and 'Spirit of Omarchy' with brand-independent terms in README.md and scripts.
- Updated nomarchy-welcome banner to 'The Professional NixOS Desktop'.
- Set nomarchy-version codename to 'Sovereign'.
- Verified core/system/branding.nix for OS-release and bootloader labels.
- Verified SDDM and Plymouth metadata for correct branding.
- Updated ROADMAP.md board.
2026-05-04 22:08:27 +01:00
Bernardo Magri
74e2dc34e3 chore: complete OOTB QA audit
Fixes identified during the thorough distro review:
- Restore automatic wallpaper switching by removing image filters from deployed themes.
- Fix broken 'Style' menu entries by creating missing about.txt and screensaver.txt branding files.
- Clean up conflicting keybindings by removing deprecated tiling.conf and updating doc generator.
- Remove legacy Nord theme hack from nomarchy-theme-set.
- Fix JSON parse error in summer-day waybar theme.
2026-05-04 21:44:31 +01:00
Bernardo Magri
3510a51492 fix(installer): resolve multi-disk LUKS/BTRFS boot hang
- Move temporary LUKS keyfile to /tmp/ so Disko omits it from runtime config
- Explicitly add x-systemd.requires and x-systemd.device-timeout=0 to BTRFS mount options
- Ensures all LUKS devices are decrypted before BTRFS attempts to mount
2026-05-03 09:13:02 +01:00
Bernardo Magri
7064108ce7 fix(distro): fix /etc/nixos ownership, theme discovery, and CLI wrappers
- installer: set recursive ownership of /etc/nixos to main user post-install
- themes: fix NOMARCHY_PATH and discovery logic for Lua theme menu
- scripts: update CLI wrappers (font, theme, wallpaper) to use Walker menus
- core: remove obsolete NOMARCHY_PATH and cleanup dead code
- features: add pkgs.lua for Walker and remove obsolete switcher.nix
- docs: update ROADMAP.md, SCRIPTS.md and STRUCTURE.md
2026-05-03 08:59:13 +01:00
Bernardo Magri
bef7be01b8 fix(installer): wire HM as a NixOS module, move env-update to system layer
The post-install standalone HM activation kept failing in new ways
(daemon access, git ownership, missing PATH on first boot). Wire HM as
a NixOS module in the generated flake instead, so first-boot dotfiles
are activated by `nixos-install` itself with proper system context. The
standalone `homeConfigurations.<user>` is kept alongside for fast
iteration via `nomarchy-env-update`. Also:

- Drop the chroot HM activation block from the installer entirely.
- Move `nomarchy-env-update` from `features/scripts/utils/` to
  `core/system/scripts/` so it ships in `nomarchy-system-scripts` and
  exists on a freshly-installed system regardless of HM state.
- Set system-wide git `safe.directory` for /etc/nixos and the
  impermanence-relocated /persist/etc/nixos so the user-mode HM run
  doesn't trip on the root-owned flake repo.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 12:24:12 +01:00
Bernardo Magri
d4f50afc62 fix(installer): start nix-daemon and trust flake repo for HM activation
HM activation inside `nixos-enter` failed with `big.lock: Permission
denied` because the chroot has no systemd and therefore no nix-daemon —
the user-level `nix run` fell back to single-user mode and couldn't
write /nix/var/nix/db. Launch nix-daemon manually for the activation
window and force NIX_REMOTE=daemon. Also mark /etc/nixos (and the
impermanence path) as a git safe.directory so HM doesn't trip over
git's dubious-ownership check on the root-owned repo. Make
nomarchy-env-update self-bootstrap via `nix run home-manager` when
home-manager isn't on PATH so the recovery hint actually works on a
freshly-installed system.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 11:56:22 +01:00
Bernardo Magri
2f18d4efcf fix(installer): unblock disko, bootloader, HM activation, hyprland res
- Pass --yes-wipe-all-disks to disko so the silent gum-spin path no
  longer hangs forever waiting on a hidden "yes" confirmation prompt
  (added in disko 1.13's destroy,format,mount mode).
- Stop threading an externally-built pkgs into the user flake's
  nixosSystem; configure nixpkgs through the module system instead so
  core/system/default.nix's nixpkgs.config.allowUnfree stops conflicting
  with the assertion "system configures nixpkgs with an externally
  created instance".
- Enable boot.loader.systemd-boot in the generated system.nix so the
  installed system has an actual bootloader (disko already lays out a
  1 GiB ESP at /boot).
- Bump nix.settings.download-buffer-size to 512 MiB to silence the
  "download buffer is full" warning on large NAR fetches.
- Activate home-manager via `runuser -l` instead of `runuser -u … --
  env HOME=…`. The latter only switches uid and leaves \$USER=root, so
  HM's activation script saw root, warned, and wrote dotfiles into
  /root/ — meaning the user's first login had no Hyprland config.
- Revert default Hyprland monitor line back to highres (live ISO and
  user default) — preferred falls back to EDID's 1024x768 in QEMU and
  on several laptop panels, which is the bug highres was put there to
  defeat.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 11:07:02 +01:00
Bernardo Magri
329dc009b6 fix(installer): repair git init, LUKS reprompt, impermanence-no exit, quiet disko
- nrun git git init -q passed 'git' as a subcommand to git itself,
  failing the post-disko repo init. Drop the duplicated arg.
- disko's luks module reads passwordFile at the top level; placing it
  under settings.* meant it was silently ignored and disko fell back
  to askPassword=true, prompting the user again on luksOpen. Move the
  option to the right scope.
- configure_impermanence now uses local rc, nrun gum confirm, and an
  explicit case (0/1/130) with a final return 0 so a No answer no
  longer aborts the installer.
- run_disko_with_retry hides disko's chatty output behind a gum spin
  by default and surfaces the captured log on failure. Set
  NOMARCHY_VERBOSE_DISKO=1 to stream output live.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 09:48:37 +01:00
Bernardo Magri
0af1395df2 fix(themes): complete summer-day with Everforest Light palette
colors.toml and icons.theme were copy-pasted from summer-night (a dark
theme). Repalette to Everforest Light, mark as light via light.mode,
switch icons to Yaru-blue, fix the broken Waybar import, and add the
btop/neovim/vscode/rofi/walker app configs the sibling themes ship.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 09:48:21 +01:00
Bernardo Magri
f2b99e0f75 adding summer-day theme 2026-05-02 09:16:58 +01:00
Bernardo Magri
6411395d9f fix(qa): comprehensive out-of-the-box audit and repair
- Fix critical bash dynamic scoping bug in install.sh (Impermanence/Form Factor).
- Polished Live ISO with auto-login and passwordless sudo.
- Repurposed nomarchy-toggle-suspend to directly execute systemctl suspend.
- Updated nomarchy-launch-wifi to use nmtui in alacritty.
- Optimized nomarchy-welcome to avoid redundant rebuilds via --no-update flag.
- Enabled nomarchy-welcome in Hyprland autostart.
- Wrapped Live ISO-modifying steps in welcome wizard to prevent failures.
- Removed obsolete hardware auto-detection from nomarchy-on-boot.
- Hardened script doc generator against false-positive wildcard tokens.
- Regenerated docs/SCRIPTS.md and updated docs/ROADMAP.md.
2026-05-01 20:03:04 +01:00
Bernardo Magri
39b1a9c1b3 style(hyprland): set default monitor to 'preferred' resolution
Updated the default Hyprland monitor configuration to 'monitor=,preferred,auto,1'. This ensures the best resolution is selected automatically while maintaining a 1x scale by default.
2026-05-01 17:00:57 +01:00
Bernardo Magri
c5544e56c8 feat(system): default to latest stable kernel
Set boot.kernelPackages to pkgs.linuxPackages_latest by default. This ensures Nomarchy users benefit from the latest hardware support and security features in the mainline kernel.
2026-05-01 16:54:01 +01:00
Bernardo Magri
0306dff092 feat(installer): implement single-input flake architecture
- Refactor generated flake.nix to use the Appliance Model.
- Downstream flake now only defines the 'nomarchy' input.
- Dependencies (nixpkgs, home-manager) are inherited from nomarchy.inputs to ensure maximum stability and version alignment with upstream.
2026-05-01 16:51:53 +01:00
Bernardo Magri
3b977f181d fix(installer): resolve disko evaluation crash and infinite loops
- Fix disko-config.nix signature by adding '...' to handle unexpected CLI arguments.
- Update disko mode to 'destroy,format,mount' for the modern API and to avoid deprecation warnings.
- Fix infinite loops in 'configure_impermanence' and 'confirm_form_factor' caused by misinterpreting 'No' (rc=1) as an abort.
2026-05-01 16:43:05 +01:00
Bernardo Magri
61cd993e54 fix(githooks): skip bash linting on non-bash nomarchy-* scripts
The nomarchy-* prefix is a name convention, not a language guarantee:
nomarchy-haptic-touchpad is Python. Without a shebang filter, the
pre-commit hook would run `bash -n` on it and abort every commit
that touched the Python helper. Filter to scripts whose shebang
matches `bash` before linting; everything else passes through.

Found via the set -e sweep (1e94818) — the survey caught
nomarchy-haptic-touchpad as a "broken" bash script when it was
just non-bash.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:50:32 +01:00
Bernardo Magri
1e9481849b chore: add 'set -e' to every nomarchy-* bash script that lacks it
Sweep across the three script directories: features/scripts/utils,
core/system/scripts, themes/engine/scripts. 142 of 169 bash scripts
gained `set -e`; 27 already had it; the one Python helper
(nomarchy-haptic-touchpad) was skipped via shebang detection.

Why: bash's default behavior is to continue past a failed command,
which means a script that does "do A; do B; do C" leaves the system
in a half-applied state when B fails - and the user gets no signal.
Several recent fix commits (theme partial-apply, waybar reload race,
installer prewipe silent failures) all trace back to this. set -e
turns silent corruption into a loud abort the user can act on.

The 11 scripts with explicit `|| true` markers stay safe under set -e
because || true coerces the exit to zero; the markers continue to
mean "I deliberately tolerate this failure here."

Deliberate exception: nomarchy-menu runs WITHOUT set -e. It is an
interactive UX loop where action branches do `cmd; back_to <self>`
so a failed action would abort the script under set -e and the menu
would disappear without feedback. Soft-failure - menu re-displays,
user picks again - is the right semantic. Documented inline.

Validation: bash -n on every modified script (zero failures). The
new pre-commit hook (27f5663) was just updated to filter by shebang
so it doesn't try to bash-syntax-check the Python helper - that
filter was uncovered by this sweep.

Risk: set -e can surface latent bugs in scripts that previously
relied on silent continuation. If anything breaks, it's a real bug
that was already broken and is now visible. Easy per-script revert
if any UX glitches show up.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:50:13 +01:00
Bernardo Magri
27f5663cdf chore(githooks): lint changed nomarchy-* scripts on commit
Adds two-tier linting before the existing docs/SCRIPTS.md regenerate
step:

- bash -n on every changed nomarchy-* script. Catches syntax errors
  that would otherwise be discovered at runtime by an unlucky user.
  Always fatal.
- shellcheck --severity=error when shellcheck is on PATH. Catches
  unquoted-var, use-before-define, missing-shebang, and other
  bug-shaped patterns. Only error-level issues block - the long
  tail of pre-existing warnings stays as a known cleanup task,
  not a commit blocker. Hook silently skips this step when
  shellcheck isn't installed (so contributors without it can still
  commit).

Catches the class of bug that's bit us repeatedly: a script ships,
the runtime path that exercises the broken line is rare, and the bug
sits latent until a user trips it. Cheaper to catch at commit time.

Caveat: 156 nomarchy-* scripts already have shellcheck warnings
(severity warning/info/style); we deliberately ship around them via
the --severity=error gate. A future per-script audit can dial the
severity up as scripts get cleaned up.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:43:37 +01:00
Bernardo Magri
28cc41abdd fix(restart-app): wait for SIGTERM to take effect before respawning
Previous behavior: `pkill -x $1` (no wait) followed by an immediate
background `setsid uwsm-app`. The new instance attached its wayland
surface while the old one's surface was still mapped. Layer-shell
apps got the same visible ghosting that waybar showed on theme switch
before the SIGUSR2 fix (386da51), and non-layer apps got brief double
instances.

Fix:
- Quote $1 (was unquoted, breaks if app name has whitespace - rare
  but cost-free to fix while we're here).
- After SIGTERM, poll pgrep for up to ~1.5s in 100ms ticks.
- If anything is still alive after the poll window, SIGKILL it -
  prevents a misbehaving process from holding the surface forever.
- Only spawn the new instance after the old one is confirmed gone.

Affects every caller that hits the non-systemd-managed restart path
(menu's update-process actions, voxtype install/remove, font-change
follow-ups, etc.).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:09:15 +01:00
Bernardo Magri
5fc9f5ee34 fix(theme): surface partial-apply failures instead of swallowing them
nomarchy-theme-set chains six optional "tell each app the theme changed"
steps. Each used `command -v X && X || true`, which collapsed two very
different outcomes into the same silent path:

  - X isn't installed -> skip (correct, expected, fine)
  - X exists but returned non-zero -> skip (wrong - user just got a
    half-applied theme with zero feedback about which app didn't refresh)

Replaced the inline guards with a small helper that distinguishes
absent from failed and accumulates real failures into a list. At the
end of the run, if anything failed, we notify-send a single message
naming the apps that didn't refresh ("Did not refresh: Waybar, btop")
and echo the same to stderr. The theme apply itself still completes -
we don't abort the chain on one failure - so the user gets the partial
benefit AND the diagnostic.

Same pattern as the waybar SIGUSR2 fix (386da51): make the hot path
loud about real problems while staying quiet about expected
no-installed states.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:08:39 +01:00
Bernardo Magri
5c5b377bd6 fix(menu): quick-state actions return to their submenu instead of exiting
After the cancel-branch sweep, the remaining UX inconsistency was in
action branches: changing one setting kicked the user out of the menu,
forcing a relaunch to change the next. Brought 16 actions across 5
submenus into the same return-to-self pattern theme/background got.

Classification rule applied:

- Quick-state actions (toggle, set, restart-service - finishes in
  milliseconds, no window opens) -> back_to <self>, so the user can
  chain "toggle nightlight, then toggle gaps, then restart waybar"
  without rerunning nomarchy-menu each time.
- Window-opening actions (editor, floating terminal, audio/wifi/bt
  launcher, browser, hyprpicker overlay, screenshot, screenrecord,
  share dialogs, lock/shutdown/logout) stay as one-shot exits -
  re-popping the menu over the new window would be visual noise.

Submenus changed:

- show_toggle_menu (8 toggles): screensaver, nightlight, idle, top
  bar, workspace layout, window gaps, 1-window ratio, display scaling.
- show_setup_power_menu: powerprofilesctl set returns; cancel still
  goes up to show_setup_menu (different destinations on each branch,
  so the if/else stays).
- show_font_menu: nomarchy-font-set returns; cancel still goes up.
- show_setup_system_menu: the suspend toggle (quick) returns;
  hibernate enable/disable (terminal) still exit.
- show_update_process_menu (5 service restarts): hypridle, hyprsunset,
  swayosd, walker, waybar.

For dynamically-rendered menus (show_setup_system_menu rebuilds its
options each invocation based on current state) this also gives free
visual feedback - the toggle's label flips between "Enable Suspend"
and "Disable Suspend" when the menu re-renders.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 20:01:48 +01:00
Bernardo Magri
4b99fa3846 fix(menu): route every cancel branch through back_to for direct-keybinding consistency
Audit of all show_*_menu functions after the theme/background fix found
11 more cancel branches that called their parent directly instead of
back_to. None are reachable from current keybindings (today's direct
invocations target submenus that already use back_to), so the bug is
latent — but any future `nomarchy-menu <area>` keybinding into one of
these would bounce the user into the parent on Esc instead of exiting
cleanly, the exact bug that prompted the previous commit's fix to
show_theme_menu / show_background_menu.

Mechanical sweep:

  *) show_main_menu   ;;  ->  *) back_to show_main_menu   ;;   (5 sites)
  *) show_setup_menu  ;;  ->  *) back_to show_setup_menu  ;;   (3 sites)
  *) show_update_menu ;;  ->  *) back_to show_update_menu ;;   (3 sites)

Behavior under nested navigation (BACK_TO_EXIT=false) is unchanged:
back_to falls through to calling the parent function by name. Only
direct-invocation cancel paths gain the correct exit-0 behavior.

Action branches and go_to_menu's dispatch table intentionally still use
direct calls — those are forward navigation, not cancel.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:53:41 +01:00
Bernardo Magri
a741b0936c fix(menu): theme and background submenus return to parent instead of exiting
The menu navigation contract: a submenu invoked directly via keybinding
(BACK_TO_EXIT=true, set by go_to_menu when nomarchy-menu is launched
with a target argument) should `exit 0` after the user's action; a
submenu invoked from a parent menu (BACK_TO_EXIT=false) should call
`back_to <parent>` to return where the user came from. back_to() honors
both modes.

Three submenus violated the contract:

- show_theme_menu and show_background_menu shell out to walker's
  Elephant plugin and don't call back_to. After picking a theme or
  wallpaper from Main -> Style -> Theme, the script exits silently
  instead of returning to Style; the user has to relaunch the menu
  from scratch to change anything else.

- show_hardware_menu's cancel branch called show_trigger_menu directly
  instead of back_to show_trigger_menu, which would have bounced a
  direct-keybinding caller into Trigger instead of exiting cleanly.

Adds the missing back_to call to the two walker-backed submenus
(parented to show_style_menu) and converts the hardware cancel branch
to back_to. The 16 other show_*_menu functions already conform.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:50:36 +01:00
Bernardo Magri
f318585dc4 fix(installer): harden disk selection and partitioning phase
The disk phase was the dominant source of incomplete installs. Six
concrete failure modes addressed in one pass:

1. Live-ISO USB excluded from the disk picker. select_disk previously
   filtered loop|ram|zram|sr but not the device the installer booted
   from; picking it would format the boot media mid-install. New
   detect_live_iso_devices walks /, /iso, /run/initramfs/live,
   /nix/.ro-store, /nix/store and resolves each backing device to its
   parent disk via lsblk -no PKNAME. Override with
   NOMARCHY_INSTALL_ALLOW_ISO_TARGET=1 for the developer case.

2. 10 GiB minimum-capacity preflight. Disko fails late and obscurely
   on undersized media; surface it while the picker is still open.

3. prewipe_target_drive rewritten:
   - Enumerates every active dm-crypt mapping via dmsetup ls and
     closes those whose backing device is on the target drive. The
     old version only knew about the hardcoded names "crypted" /
     "crypted_main" so an aborted multi-disk run or a non-Nomarchy
     install would leave a holder open and silently break the wipe.
   - Drops `|| true` from wipefs / sgdisk / dd. After the LUKS and
     swap teardown above, a real failure means something is still
     holding the device — surface that instead of papering over it.
   - udevadm settle bounded to 30s so a flapping USB can't hang.
   - Post-wipe sanity check: refuse to hand the disk to disko if
     anything is still mounted off it.

4. run_disko_with_retry wraps the disko call. On failure, shows the
   last 30 lines of output via gum style and offers Retry /
   View full log / Abort. set -e is suspended for the disko call so
   the exit code can be inspected. The previous bare `disko --mode
   disko` aborted the whole installer with output scrolled past.

5. Sed-templated disko-golden.nix + disko-btrfs-multi.nix pair
   replaced by a single disko-config.nix Nix function of
   { mainDrive, extraDrives ? [] } called via --argstr / --arg.
   Templating Nix via shell-escaped string substitution caused at
   least one production bug (3aadc36 fixed embedded-newline
   escaping); function arguments are the right shape and eliminate
   the entire class of escaping concerns. Single-disk path is
   `extraDrives = []`; multi-disk gets BTRFS `-d single -m raid1`
   plus the additional /dev/mapper/* devices. Hosts that shipped
   /etc/disko-golden.nix now ship /etc/disko-config.nix.

6. EXIT trap added so the tmpfs LUKS key file (/dev/shm/nomarchy-
   luks.key) is removed even if the script aborts between key-write
   and the explicit unset. Replaced redundant `shred -u` on tmpfs
   with `rm -f` (already in RAM).

Verification: bash -n on install.sh, nix-instantiate parse + strict
eval on disko-config.nix in both single and multi shapes, full
nix flake check --no-build evaluating all three NixOS configurations
(default, nomarchy-installer, nomarchy-live) plus the installerVm.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:42:00 +01:00
Bernardo Magri
386da51178 fix(waybar): SIGUSR2 reload to avoid surface-recreate ghost on theme switch
Theme-switching ran systemctl --user restart waybar.service, which tears
down waybar's wayland layer-shell surface and creates a new one
back-to-back. Hyprland needs a frame to clear the destroyed surface; the
new instance attaches its surface immediately, so for a frame or two the
old waybar pixels remain visible behind/under the new bar - the
"artifacts and old colors on top of new" symptom most visible on the
fresh compositor of the live ISO.

Switch to SIGUSR2 reload, which makes waybar re-read config.jsonc and
CSS (including @import-ed files like ~/.config/nomarchy/current/theme/
waybar.css that theme-switch rewrites) without destroying the surface.
Full systemctl start is kept for the cold-start case.

Drive-by: replace the `systemctl list-unit-files` presence check with
`systemctl cat` - list-unit-files returns 0 even on no-match, so the
old check would always pick the systemctl branch and never fall through
to the pkill fallback on systems where waybar isn't a systemd unit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:24:25 +01:00
Bernardo Magri
d06ef86bb9 feat(gaming): add nomarchy.gaming.enable home-side window rule
Mirror of nomarchy.system.gaming.enable. When on, injects a Hyprland
windowrulev2 = fullscreen, class:^(steam_app_).*$ so games launched
through Steam grab the whole screen instead of opening windowed.

Gated via lib.mkIf so the rule is absent when the option is off
(AGENT.md guardrail: features must be option-gated). The rule is
appended to wayland.windowManager.hyprland.extraConfig (types.lines)
so it composes cleanly with the existing source-line entry point in
features/desktop/hyprland/default.nix.

Closes the "Gaming - Hyprland window rule" Next-column roadmap row.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 19:14:21 +01:00
Bernardo Magri
3aadc36bff fix(installer): implement robust step-based navigation and fix multi-line sed error
- Implement a step-based state machine in main loop to support 'Back' navigation via Esc.
- Refactor all prompts to use safe exit-code capture (rc -eq 130/1) and handle 'not submitted' output.
- Add input flushing after Esc events to prevent cascading backtrack signals.
- Add short-circuit checks to every wizard stage for reliable skip-forward behavior.
- Fix sed error when generating multi-disk configurations by escaping newlines in additional_disks.
- Add explicit 'Set a hostname' message to the hostname prompt.
- Convert unsafe short-circuit lists to safe if statements to prevent set -e crashes.
2026-04-26 22:17:00 +01:00
Bernardo Magri
55f0653e59 feat(desktop): default to highest monitor resolution
- Change default monitor rule from 'preferred' to 'highres' in monitors.conf.
- Explicitly force 'highres' in the live ISO (nomarchy-live) to avoid low-res fallbacks on some hardware.
- Update roadmap.
2026-04-26 20:03:46 +01:00
Bernardo Magri
dd48411013 feat(scripts): extend nomarchy-welcome into a guided wizard
- Added nomarchy.panelPosition option and state persistence.
- Updated Waybar to respect the panelPosition setting.
- Refactored nomarchy-welcome to use state.json instead of a flag file.
- Added prompts for theme, font, panel position, and starter home.nix generation.
- Updated documentation and roadmap.
2026-04-26 20:02:52 +01:00
Bernardo Magri
c66f0b19cd feat(installer): add multi-disk BTRFS support
- Allow selecting multiple drives in the TTY installer using gum choose --no-limit.
- Add installer/disko-btrfs-multi.nix template for BTRFS RAID/Single setups.
- Dynamically generate multi-disk disko configurations with LUKS-on-every-disk.
- Default to BTRFS 'single' data and 'raid1' metadata for maximum capacity across mismatched drives (e.g., 20GB + 120GB SSDs).
- Update roadmap and structure documentation to reflect the new capabilities.
2026-04-26 19:44:34 +01:00
Bernardo Magri
6de8ecd093 feat(distro): rename ISO targets and fix UEFI boot in live test script
- Rename installerIso and installerIsoGraphical to nomarchy-installer and nomarchy-live.
- Update host configurations with proper Nomarchy branding and volume IDs.
- Fix nomarchy-test-live-iso QEMU launch by using -drive if=pflash for UEFI firmware.
- Add nomarchy-build-live-iso utility script.
- Scrub remaining Omarchy references in Plymouth, installer messages, and docs.
- Regenerate docs/SCRIPTS.md to reflect new and renamed utilities.
2026-04-26 15:29:04 +01:00
Bernardo Magri
21230a05eb feat(installer): review-then-edit loop with field-level re-prompt
Previously the review screen only offered Confirm/Abort, so a typo or
wrong-disk choice meant aborting the whole run and starting over (or
hand-editing /tmp/nomarchy-install.state.sh). On --resume the situation
was worse: every prompt re-runs (each short-circuits when its var is
set), the user lands on a review they can't change.

review_configuration() now offers Continue / Edit a field / Abort. Edit
opens a multi-select of every saved field; chosen fields clear and the
next loop iteration in main() re-prompts only those. The LUKS passphrase
short-circuits when already set, so editing other fields doesn't
re-prompt for it.

Net flow change:
- Fresh install: same prompts, then review with Edit option (typo fixes
  without restarting).
- --resume: state loads, every prompt skips (vars set), lands straight on
  review — exactly what the roadmap entry called for.

Verified via `bash -n`. Live VM dry-run not exercised in this session.
2026-04-26 09:21:40 +01:00
Bernardo Magri
4b2f16c2f0 docs: add TROUBLESHOOTING.md for the five common rebuild errors
Covers: option-already-declared (duplicate mkOption), attribute-missing
(forgot to import nomarchy.nixosModules.system), Stylix target conflict
(needs lib.mkForce, not bare bool), home-manager .hm-bak churn (left over
from backupFileExtension after first install), and impermanence path
missing (dir not in environment.persistence list).

Each entry has the literal error text, the cause, and a copy-paste fix.
Linked from README.md and docs/MIGRATION.md so users hit it before
guessing.
2026-04-26 09:16:40 +01:00
Bernardo Magri
21ee9c6035 feat(system): add gaming preset module
Opt-in `nomarchy.system.gaming.enable` (default false). Wires
`programs.steam` (with `remotePlay` and `localNetworkGameTransfers`
firewall holes opened via `mkDefault`), `programs.gamemode` (the
launching user must be in the `gamemode` group), and
`services.flatpak`.

Two pieces of the original roadmap entry split into separate
Next-column rows so the system-side preset ships now:

  1. Hyprland fullscreen-on-Steam-launch window rule (home-side).
  2. Declarative flathub remote (nixpkgs has no API for this; needs
     either an overlay or a one-shot systemd unit).

The flatpak service is enabled but the user must add flathub
manually after first boot — documented in OPTIONS.md.
2026-04-26 09:10:52 +01:00
Bernardo Magri
8266dc7ee2 feat(system): add accessibility preset module
Opt-in `nomarchy.system.accessibility.enable` (default false —
accessibility is a personal preference, not hardware-derived). Wires
`services.gnome.at-spi2-core`, installs `pkgs.orca`, and sets
`XCURSOR_SIZE` to a configurable `accessibility.cursorSize` (default
32, up from NixOS's 24).

The original roadmap entry bundled Hyprland-side bits (slower
key-repeat, Orca launch keybinding, high-contrast palette). Those
require touching home-manager / theme files and a new palette
directory; split into a separate Next-column row so the system-side
preset ships now and the desktop integration follows independently.
2026-04-26 09:06:02 +01:00
Bernardo Magri
16ed8f1df1 docs(agent): require docs to ship with the change that triggers them
Adds an 8th guardrail and replaces §5.4 with an explicit "if you change
X, update Y" mapping covering options, scripts, keybindings, structure,
installer, themes, roadmap, conventions, and flake-level changes.

Each row names the doc to touch. The closing line forces a one-pass
check before declaring a change done — eliminates "docs catch-up" PRs
and keeps the distro and its docs from drifting apart.
2026-04-26 08:53:58 +01:00
Bernardo Magri
e9c9342965 feat(system): add desktop preset module
Mirror of the laptop preset for the desktop form factor. New
`nomarchy.system.desktop.enable` defaults to `formFactor == "desktop"`,
so the installer's existing formFactor write auto-flips it on without
installer changes (same pattern as laptop).

The module pins `powerManagement.cpuFreqGovernor` to `"performance"`
(via mkDefault) and enables `services.zfs.{autoScrub,trim}` so a
future ZFS pool gets sensible maintenance for free. The ZFS knobs are
no-ops until the user adds zfs to `boot.supportedFilesystems`.

Battery widget filtering is already driven by `formFactor` itself in
`features/desktop/waybar/default.nix`, so the preset doesn't repeat
it. Closes the "Desktop preset module" Next item.
2026-04-26 08:51:28 +01:00
Bernardo Magri
5b014cfa29 chore(audit): refine docs-scripts detector and lock in via pre-commit
Two detector bugs fixed:

1. grep_includes missed *.lua, *.ini, *.desktop, *.json — so callers in
   elephant providers (lua), mako on-button-* hooks (ini), and any future
   MimeType-registered URL handlers (.desktop) were invisible. Adding them
   reclassifies nomarchy-notification-dismiss and nomarchy-theme-bg-set
   from `unused?` to `kept` (true callers in mako/core.ini and the
   elephant background_selector lua).

2. The all_refs regex `nomarchy-[a-z0-9][a-z0-9-]+` greedily captured
   trailing dashes, producing junk missing-tokens like `nomarchy-pkg-`,
   `nomarchy-cmd-`, `nomarchy-restart-`, etc. from glob references like
   `for c in nomarchy-pkg-*`. Tightened to require an alphanumeric end
   character. Also restricted to grep_includes so the binary tmpfile
   path `nomarchy-menu-rows` no longer leaks in.

New .githooks/pre-commit re-runs the generator and stages docs/SCRIPTS.md
whenever a nomarchy-* script changes. Enable per clone with
`git config core.hooksPath .githooks` (now mentioned in docs/AGENT.md).

Net audit shift after regen: unused? scripts 31→29, missing tokens 30→28,
no false-positive prefix tokens remain.
2026-04-26 08:44:13 +01:00
Bernardo Magri
034da701a3 feat(system): add laptop power preset module
New `nomarchy.system.laptop.{enable,thermald}` options. `enable`
defaults to `formFactor == "laptop"`, so the installer's existing
formFactor write auto-flips the preset on without installer changes.

The module wires TLP (governors + 75/80 charge thresholds),
force-disables power-profiles-daemon (mutually exclusive with TLP),
enables upower and thermald (x86_64), adds the brightnessctl udev
rule so the existing brightness scripts work without root, and sets
a logind lid-switch policy that resolves to suspend-then-hibernate
when `hibernation.enable` is on, plain suspend otherwise.

Closes the "Form-factor → laptop preset auto-enable" Now item and
the "Laptop preset module" Next item from docs/ROADMAP.md in one
change.
2026-04-26 08:31:19 +01:00
Bernardo Magri
7086a6f29c feat(installer): add software-profile multi-select
- Add select_profiles step with gum choose --no-limit
- Implement state persistence and review for selected profiles
- Map profiles to home.packages and system-level toggles (Docker, Steam)
- Update generate_flake_config to emit profile-specific Nix snippets
- Fix duplicate environment.systemPackages in virtualization.nix
- Update ROADMAP.md
2026-04-25 22:44:24 +01:00
Bernardo Magri
1545e63c7d docs: update roadmap and scripts audit status after phase B 2026-04-25 22:40:33 +01:00
Bernardo Magri
f965f0be2c feat(audit): address batch 4 and finalize script audit
- Implement nomarchy-skill, nomarchy-manual, nomarchy-backup, nomarchy-install
- Implement nomarchy-install-docker-dbs (stub)
- Port nomarchy-docs-keybindings and nomarchy-docs-scripts to packaged scripts
- Add installerVm to flake.nix nixosConfigurations, packages, and apps
- Update nomarchy-test-installer to use nix run .#installerVm
- Add docker support to virtualization.nix and options.nix
- Add glow to script dependencies
- Finalize docs/SCRIPTS.md update
2026-04-25 22:39:11 +01:00
Bernardo Magri
fb22e390e8 feat(audit): address batch 3 of missing scripts
- Implement nomarchy-pkg-install, nomarchy-pkg-drop, nomarchy-pkg-aur-add (stub)
- Implement nomarchy-theme, nomarchy-font, nomarchy-wallpaper wrappers
- Update docs/SCRIPTS.md with 'kept' status for new scripts
2026-04-25 22:37:06 +01:00
Bernardo Magri
074dc3576c feat(audit): address batch 2 of missing scripts
- Implement nomarchy-version, nomarchy-debug, nomarchy-reinstall, nomarchy-rollback, nomarchy-upload-log
- Implement nomarchy-refresh-hyprland and nomarchy-refresh-waybar
- Update docs/SCRIPTS.md with 'kept' status for new scripts
2026-04-25 22:36:19 +01:00
Bernardo Magri
0728da4374 feat(audit): address batch 1 of missing scripts and enable fwupd
- Move 18 Hyprland/desktop scripts from features/desktop/scripts/ to packaged directories
- Add nomarchy.hardware.fwupd option (default false) and enable service
- Implement nomarchy-update-firmware wrapper for fwupdmgr
- Add hyprland, swayosd, and fwupd to nomarchy-system-scripts dependencies
- Update docs/SCRIPTS.md with 'kept' status for ported scripts
2026-04-25 22:34:04 +01:00
Bernardo Magri
983ade0f55 fix(theme): wire obsidian sync into theme-set; drop vscode placeholder
Phase B verdict on two unused? entries in the theme-engine scripts.

- nomarchy-theme-set-obsidian: real script that copies the active
  theme's obsidian.css into every Obsidian vault under
  ~/.config/obsidian/obsidian.json. Wires it into nomarchy-theme-set
  next to the btop/opencode hot-reloads. Self-gates twice (no
  obsidian.css → exit 0; no .obsidian dir → continue), so it's a
  no-op for users without Obsidian.

- nomarchy-theme-set-vscode: delete-dead. Its own comment admitted
  it was "mostly a placeholder"; its only action (nomarchy-env-update)
  is already done unconditionally upstream by nomarchy-theme-set.
  The NOMARCHY_TOGGLE_SKIP_VSCODE_THEME env var it gated on is
  exported by features/scripts/default.nix:73 from
  nomarchy.toggles.skipVsCodeTheme, but with this script gone there
  are no consumers; the toggle survives as a public option until a
  follow-up wires it through the VSCode module properly.

SCRIPTS.md regenerated: unused? 34 → 32, kept 165 → 166. nix flake
check clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 22:18:03 +01:00
Bernardo Magri
d2b508485a fix(theme): hot-reload btop and opencode on theme switch
Phase B verdict on two unused? scripts — both inline comments
claimed they were "used by the Nomarchy theme switching", but the
switcher (themes/engine/scripts/nomarchy-theme-set) only restarted
walker, waybar, and the wallpaper service. So btop and opencode
stayed on the old palette after `nomarchy-theme-set <foo>` until
the user closed and reopened them by hand.

Wires both into nomarchy-theme-set, alongside the existing walker /
waybar restart calls. The check-then-call (`command -v ... &&`)
matches the surrounding style — a missing helper is a no-op, not a
fatal.

SCRIPTS.md regenerated: unused? 36 → 34, kept 163 → 165.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 22:13:52 +01:00
Bernardo Magri
cc93491232 chore(audit): delete-dead — unused nomarchy-hw-* detection scripts
Phase B verdict on four core/system/scripts/nomarchy-hw-* entries
flagged `unused?` in the Phase A inventory. Wide grep confirmed
the only references were the audit doc itself.

Removed:
  - nomarchy-hw-framework16 (superseded by `nomarchy-hw-match "Laptop 16"`
    in nomarchy-on-boot)
  - nomarchy-hw-surface     (no caller; "Surface" string would route
    through nomarchy-hw-match if needed)
  - nomarchy-hw-intel       (no caller; vendor detection isn't a public
    API — installer/hardware-db.sh handles install-time dispatch and
    nomarchy.hardware.* options handle build-time)
  - nomarchy-hw-intel-ptl   (same — Panther Lake GPU detection isn't
    used anywhere)

Kept: nomarchy-hw-match (the dispatcher), nomarchy-hw-asus-rog
(called by nomarchy-on-boot), nomarchy-hw-vulkan (called by
nomarchy-voxtype-install).

SCRIPTS.md regenerated: unused? 40 → 36; nix flake check clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 22:11:47 +01:00
Bernardo Magri
aa20399210 docs(audit): generator discovers references in *.md, README, and txt
Scope: small Phase B improvement to the discovery heuristic so the
audit table stops false-flagging documented user-CLI tools as unused.

The generator now grep -r searches *.md, *.txt, *.sample alongside
*.nix / *.conf / *.sh, and explicitly walks README.md. SCRIPTS.md,
ROADMAP.md, and AGENT.md are excluded from the search (they document
the scripts but aren't callers — including them would promote every
script to `kept`).

Status histogram: 158 → 163 kept, 45 → 40 unused?, 75 → 85 missing
(the missing bump comes from grepping aspirational scripts named in
ROADMAP — wait, that doc is excluded — so the new missing rows are
references in MIGRATION/STRUCTURE/creating-themes that name scripts
which don't exist).

Per-script triage of the remaining 40 unused? rows is the next Phase
B batch.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 22:02:45 +01:00
Bernardo Magri
86bc0e570b docs: Pillar 3 Phase A — script & menu audit inventory
bin/utils/nomarchy-docs-scripts walks features/scripts/utils,
core/system/scripts, and themes/engine/scripts; emits a populated
SCRIPTS.md with three tables:

- Scripts (136): location, top callers, status (kept / unused?).
- Missing references: tokens grepped from code with no script file
  (75 rows tagged missing).
- Menu items: every case arm in nomarchy-menu's show_*_menu
  functions, mapped to its target command and tagged.

Status histogram: 158 kept, 75 missing, 45 unused?. Phase B opens
per-batch PRs that refine missing → port-from-omarchy /
delete-dead / stub-with-notify, and unused? → kept / delete-dead.

Roadmap and AGENT.md updated to point at the generator and
explain the Phase B workflow. Now-column row replaced with the
Phase B handoff.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 21:59:06 +01:00
Bernardo Magri
bf30cd07d8 feat(installer): richer disk picker (vendor, model, serial, type)
Replaces the bare `NAME SIZE` lsblk listing in select_disk with a
six-column table — NAME, SIZE, TYPE, VENDOR, MODEL, SERIAL — aligned
via column -t. TYPE is derived from ROTA + TRAN (NVMe / USB / SSD /
HDD). Empty vendor/model/serial fields render as `--` instead of
collapsing the alignment. Filters loop, ram, zram, sr devices.

Roadmap row moves to Shipped.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 21:49:36 +01:00
Bernardo Magri
c9ff6f26f3 docs: add KEYBINDINGS.md generated from Hyprland bindings
bin/utils/nomarchy-docs-keybindings parses every bindd= / bindeld=
line in the core + feature binding files into a six-section Markdown
table (Utilities, Tiling, Tiling v2, Clipboard, Media keys, Apps).
233 bindings rendered. code:NN keycodes and XF86* media keys are
prettified.

README's keybinding table is slimmed to five highlights and now
links the generated doc; the roadmap's Now-column row moves to
Shipped.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 21:47:15 +01:00
Bernardo Magri
133ef9ddfc docs: add AGENT.md briefing for AI agents continuing the roadmap
Self-contained handbook so a fresh agent (or future-me) can land
useful work on the first turn: vision, repo layout, guardrails,
how to find work, the per-change workflow, common patterns, and
hard-don't-do rules. Points at ROADMAP.md / SCRIPTS.md as the
durable work queue.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 21:39:38 +01:00
Bernardo Magri
f09bfbc4e7 docs: relocate MIGRATION.md into docs/
Keeps every long-form doc under docs/ — only README.md remains at the
repo root. Updates the two references (README.md, docs/ROADMAP.md).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 21:36:24 +01:00
Bernardo Magri
2950dd171e docs: add ROADMAP.md + SCRIPTS.md, retire TODO.md
ROADMAP.md is the durable mid-term plan: vision, guardrails, Now/Next/
Later board, and seven pillars (audit, installer, power/presets,
onboarding/docs, test/CI/release, process). SCRIPTS.md is the
scaffolding for the Pillar 3 script & menu audit — methodology,
generator commands, and a snapshot of currently orphaned callers.

The two open items in TODO.md (software-profile multi-select, richer
disk metadata) move into the roadmap's Now column; the rest of TODO.md
was already shipped, so the file is removed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 21:35:28 +01:00
Bernardo Magri
6ef28f022b docs: link MIGRATION.md from README
Surface the in-place migration path next to the clean-install wizard
so existing NixOS users discover it without spelunking the repo.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 21:19:53 +01:00
Bernardo Magri
3cb012bcba docs: add OPTIONS.md reference, link from README
Catalogues every nomarchy.{system,hardware,…} and nomarchy.* (home) option
so downstream flake users can see what's available without grepping
options.nix. Linked from the Configuration & Usage section of README.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 21:17:51 +01:00
Bernardo Magri
e438004cec chore: misc tweaks — nm-applet autostart, thunar, SUPER+Q close, monitor preset
- autostart nm-applet --indicator under uwsm-app
- install networkmanagerapplet system-wide
- swap Nautilus for Thunar in file-manager bindings
- close-window bound to SUPER+Q (was SUPER+W)
- switch the active monitor preset from retina/2x to 1x 1080p/1440p
- summer-night waybar: drop custom/battery + backlight from modules-right

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 20:28:19 +01:00
Bernardo Magri
a7e7fa9562 feat: keymap/locale + form factor in installer; nm-applet visible by default
- Installer prompts for keyboard layout (with optional variant) and locale
  via curated short list + Other… fallback into the full localectl list;
  applies to the live session immediately (loadkeys + hyprctl) so the
  rest of the install types correctly. Generated system.nix emits
  console.keyMap, i18n.defaultLocale, and services.xserver.xkb.{layout,
  variant}.
- New nomarchy.{system,}.formFactor enum (laptop|desktop, default laptop).
  Installer auto-detects via /sys/class/power_supply/BAT* and lets the
  user flip the answer. Waybar drops the battery widget on desktop;
  battery-monitor service is gated on the same option.
- Lift waybar tray out of the collapsed group/tray-expander in the default
  theme so nm-applet's icon is visible without expanding the drawer.
- Live ISOs (TTY + graphical) get baseline mkDefault keyMap/locale so the
  installer's runtime override always wins.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 20:26:55 +01:00
Bernardo Magri
7fd0f78d7c minors 2026-04-25 16:01:55 +01:00
Bernardo Magri
6203413425 chore: drop makima/Typora/xournalpp; gate fcitx5/voxtype/opencode behind options
Tier A removals — small, half-wired modules nobody had asked for:

- makima (Copilot-key remapper): drop core/system/makima.nix, the
  features/apps/makima/ keyboard.toml, the nomarchy-restart-makima script,
  the `nomarchy.system.features.makima` option, the state-file binding,
  the import in core/system/default.nix, and the "Key Remapping" entry
  in nomarchy-menu. ~50 LoC + a service nobody asked for.
- Typora theme dir (core/home/config/Typora/) — Typora is a paid tool
  Nomarchy doesn't even ship; the SUPER+SHIFT+W keybinding pointed at a
  binary that wasn't on PATH.
- xournalpp settings (core/home/config/xournalpp/) — referenced
  /usr/share paths that don't exist on NixOS.
- core/home/config/environment.d/fcitx.conf — manual env vars are
  redundant once fcitx5 routes through NixOS's i18n.inputMethod.

Optionalization — three half-wired features now sit behind explicit
toggles, all default off (except keyring which keeps its existing
default-on):

- nomarchy.system.inputMethod.enable: new core/system/input-method.nix
  uses NixOS's i18n.inputMethod with fcitx5 + mozc/chinese/table addons.
  Drops the Hyprland exec-once line — i18n.inputMethod handles autostart.
- nomarchy.system.voxtype.enable: marker option for users who install
  voxtype out-of-band (it's not in nixpkgs). Today it just documents
  intent; the existing keybinding + waybar widget no-op gracefully.
- nomarchy.apps.opencode.enable: gates the existing
  features/apps/opencode/default.nix xdg.configFile so the opencode
  config only deploys when the user opts in.

Installer:
- system.nix and home.nix templates now surface the new toggles in their
  "Optional Nomarchy modules" comment blocks.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 14:56:28 +01:00
Bernardo Magri
4ddc91b930 feat: Tier 1 system features — snapper, hibernate, containers, libvirt, keyring
Five opt-in modules lifted from bernardo/nixos and adapted to Nomarchy's
nomarchy.system.* option namespace. All default off (except keyring which
defaults on); evaluation of the existing VM/ISO is unchanged when the
toggles are unset.

- core/system/snapper.nix: BTRFS timeline snapshots (5h/7d), nixos-rebuild-snap
  wrapper that pre-snaps before each switch using the running hostname.
  Auto-skips when / isn't BTRFS so impermanence/non-BTRFS hosts are safe.
- core/system/hibernate.nix: suspend-then-hibernate on lid/idle/power-key
  with configurable idleMinutes (default 30). Description warns swap is
  required.
- core/system/containers.nix: rootless Podman with dockerCompat + dns +
  podman-compose, podman-tui, dive. Better default than the docker daemon
  for a desktop distro.
- core/system/virtualization.nix: extends the existing uwsm/Hyprland file
  with a libvirt + virt-manager + OVMF branch behind
  nomarchy.system.virtualization.libvirt.enable.
- core/system/pam.nix: GNOME Keyring auto-unlock at SDDM/login/hyprlock
  plus gcr-ssh-agent so SSH keys flow through the keyring instead of a
  separate ssh-agent. Default on.
- core/system/options.nix: declares the five new options.
- core/system/default.nix: imports the four new files.
- installer/install.sh: surfaces all five toggles as commented one-liners
  in the "Optional Nomarchy modules" section of the generated system.nix.
  Verified via the existing dry-run / generator smoke test.

Verified each toggle lights up the right NixOS option (services.snapper,
logind IdleAction, virtualisation.podman/libvirtd, pam.sddm.enableGnomeKeyring)
via nix eval against extendModules. VM and live-ISO toplevels still build.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 11:18:15 +01:00
Bernardo Magri
220fc7f699 fix: point downstream flakes at git.bemagri.xyz, not github
Upstream Nomarchy is hosted on the self-hosted Gitea at
git.bemagri.xyz/bernardo/Nomarchy.git, not github.com/bemagri/nomarchy.

- installer/install.sh: generated `nomarchy.url` now uses
  `git+https://git.bemagri.xyz/bernardo/Nomarchy.git` (with `?rev=<sha>`
  for the pinned form).
- MIGRATION.md: matches; the `hardware_detect` clone snippet now points
  at the same URL.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 10:46:59 +01:00
Bernardo Magri
f0bd25f902 fix: stop the "nix-colors / non-existent input nixpkgs" warning
nix-colors is a pure data flake (base16 schemes) — it declares no inputs,
so `inputs.nixpkgs.follows = "nixpkgs"` against it produces a warning on
every evaluation. Drop the override and just `url`-import it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 10:45:31 +01:00
Bernardo Magri
955269f9a2 docs: add MIGRATION.md for in-place adoption from existing NixOS
Documents the layered-adoption path: add nomarchy as a flake input, build
a single pkgs with nomarchy.overlays.default, wire nomarchy.nixosModules
into both nixosSystem and a standalone homeManagerConfiguration, and
rebuild. Preserves the user's hardware-configuration, hostname, and
account; no reformat.

Calls out the conflicts an existing config will hit (DM, Hyprland, audio,
NetworkManager, user groups, /etc/os-release rebrand, autoLogin) with
explicit mkForce/drop-this-line guidance. Points at the live-ISO clean
install as the alternative for users who'd rather start fresh.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 10:40:31 +01:00
Bernardo Magri
bb435a47bb fix(live-iso): stop initrd GPU panic + clear install pointer on login
- boot.initrd.kernelModules force-loaded amdgpu+radeon+nouveau+i915 in the
  live ISO, panicking on hosts where more than one driver matched the GPU.
  Move them to availableKernelModules so udev only loads what fits.
- Override services.getty.helpLine with a Nomarchy welcome that points at
  `sudo /etc/install.sh` (+ --dry-run / --resume variants). Replaces the
  upstream "NixOS" message.
- Ship installer/hardware-db.sh as /etc/hardware-db.sh so the installer's
  auto-detection works when invoked from the live ISO.
- Add live-ISO-only Hyprland exec-once: notify-send + an alacritty
  "Nomarchy Installer" terminal that prints the install commands. The
  graphical autologin user now sees a pointer instead of guessing how to
  start the install.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 10:24:49 +01:00
Bernardo Magri
e66537523a feat(installer): UX polish — dry-run, resume, UEFI gate, pre-flight, zram
Adds command-line flags and safety rails on top of the existing install.sh.

CLI:
- `--dry-run` generates the flake into /tmp/nomarchy-dryrun.* and parse-checks
  every produced file without touching the disk. Skips LUKS / user password
  prompts and the destructive confirmation; sets safe stub values.
- `--resume` reloads non-secret answers from /tmp/nomarchy-install.state.sh
  (saved via `declare -p` after each step) and skips already-answered prompts.
  Passwords are NEVER persisted — the user re-enters them.
- `--help` documents the flags.

Safety:
- Bail early in check_environment if /sys/firmware/efi is absent. The disko
  config assumes UEFI + ESP; on a BIOS-booted host we'd partially install
  before failing.
- After nixos-install, run `nixos-rebuild dry-build --flake /etc/nixos#$HOSTNAME`
  inside `nixos-enter` to surface evaluation errors while the live ISO is
  still around to fix them.
- ENABLE_IMPERMANENCE now defaults to "" so the resume path can distinguish
  "not yet asked" from a deliberate "false" answer.

Generated config:
- system.nix gets `zramSwap.enable = true;` — near-free memory headroom on
  small machines, harmless on big ones (kernel only uses it under pressure).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 10:18:41 +01:00
Bernardo Magri
04512eabcd fix: include modifications missed by 528447c
Previous commit only picked up the new files (branding.nix, hardware-db.sh).
This adds the matching wires:

- core/system/default.nix: import branding.nix
- flake.nix: expose overlays.default = nomarchyOverlay for downstream flakes
- installer/disko-golden.nix: 1 GiB /boot, @snapshots subvolume, LUKS key
  via /dev/shm
- installer/install.sh: hardware auto-detect, hostname prompt, pinned
  nomarchy commit, shared pkgs in generated flake, flake.lock generation,
  post-install home-manager switch via nixos-enter

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 10:07:17 +01:00
Bernardo Magri
528447cc19 feat: smarter installer + Nomarchy os-release rebrand
Hardware:
- New installer/hardware-db.sh: flat regex table mapping sys_vendor +
  product_name to nixos-hardware modules (Framework, Dell, Lenovo, Surface,
  ASUS, Apple T2, System76).
- install.sh:select_hardware now auto-detects CPU vendor, GPU vendor, chassis
  type, and known model, then offers Accept / Add / Override. Manual menu
  retained as a fallback.
- Fixes a latent bug where HARDWARE_MODULES used literal "\n" inside a
  heredoc, producing invalid Nix.

Downstream flake:
- Capture the running Nomarchy commit and pin `nomarchy.url` to it so the
  installed system can't drift onto a newer breaking main.
- Prompt for a real hostname; nixosConfigurations.<hostname> replaces the
  generic .default. networking.hostName lands in system.nix.
- Generated flake now derives a single `pkgs` from nixpkgs + Nomarchy's
  `overlays.default` and shares it between nixosSystem and the standalone
  homeManagerConfiguration so dotfile-fast-iteration with nomarchy-env-update
  stays separate from `nixos-rebuild` while still seeing Nomarchy packages.
- `nix flake lock` runs in /mnt/etc/nixos before nixos-install so first boot
  consumes the resolved set.
- Post-install, run home-manager switch inside `nixos-enter` via runuser so
  the user's first login already has dotfiles. Failure is non-fatal.

Disk layout:
- /boot bumped to 1 GiB (was 512 MiB; tight with multi-generation kernels).
- New @snapshots subvolume at /.snapshots for snapper/btrbk/rollback.
- LUKS passphrase moved from /tmp/secret.key to /dev/shm/nomarchy-luks.key
  (tmpfs), shredded after disko, LUKS_PASSWORD unset.

Branding:
- New core/system/branding.nix sets system.nixos.distroId = "nomarchy" and
  distroName = "Nomarchy". /etc/os-release now reports Nomarchy, so fastfetch
  and other os-release readers show the right name.

Cleanup:
- flake.nix exposes `overlays.default = nomarchyOverlay` for downstream use.
- Trailing duplicated `main "$@"` + orphan `}` removed from install.sh.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 10:06:47 +01:00
Bernardo Magri
877da19770 feat: make VM and live ISO match an installed Nomarchy
- Migrate VM and graphical ISO to home-manager.nixosModules.home-manager;
  drop the standalone-HM sudo-based activation script (ran HM against
  /root because HOME wasn't reset) in flake.nix, core/system/vm-guest.nix,
  hosts/live-iso.nix.
- Run swaybg as nomarchy-wallpaper.service instead of a silent Hyprland
  exec-once so failures surface in systemctl.
- Skip the battery monitor unit on hosts without /sys/class/power_supply/BAT*
  (VMs, desktops).
- Don't wrap walker --dmenu in uwsm-app; redirect setsid background std-fds
  in nomarchy-launch-walker so $(menu ...) in nomarchy-menu doesn't hang.
- Restart waybar/walker via systemctl --user rather than pkill + uwsm-app
  to stop the post-theme-switch color race.
- Wire nomarchy-restart-walker/-waybar into nomarchy-theme-set so themes
  that only change the imported CSS reload correctly.
- Waybar: pin #custom-nomarchy to the Nomarchy font and use the U+F000
  codepoint so the logo shows across all themes.
- Auto-install the correct icon-theme package per palette via a new
  nomarchyLib.iconThemePackage helper in lib/default.nix; Everforest now
  actually renders for summer-night.
- Pre-cache every theme's HM generation: new packages.allThemeVariants
  flake output and nomarchy-themes-prebuild script so theme switches are
  cache-only (no Stylix rebuild, no downloads).
- Add nomarchy-test-live-iso to boot the graphical ISO in QEMU the same
  way nomarchy-test-vm does, with virtio-gpu support added to live-iso.nix.
- Installer-generated home.nix/system.nix now ship a curated, commented
  app menu (btop/fastfetch/chromium on by default) plus optional system
  services (Docker, libvirtd, Tailscale, Syncthing, Flatpak, Steam).
- nomarchy-test-vm now wipes the stale nomarchy.qcow2 before launch.
- Remove obsolete GEMINI.md and PLAN.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 18:20:54 +01:00
Bernardo Magri
096124c04a fix: resolve makima 404 and undefined overridesDir variable 2026-04-13 21:19:42 +01:00
Bernardo Magri
3101c0fea2 fix: resolve waybar css selector mismatch and update audit documentation 2026-04-13 20:16:21 +01:00
Bernardo Magri
d9c35f5ff6 fix: resolve evaluation purity, missing packages, and brittle paths 2026-04-13 19:50:09 +01:00
Bernardo Magri
cabc668c77 fix: exhaustive logical audit of installer, live-iso and system configurations 2026-04-13 19:26:47 +01:00
Bernardo Magri
2d587d40ff feat: pre-activate standalone Home Manager environment in VM and Live ISO 2026-04-13 15:24:51 +01:00
Bernardo Magri
d3042c4fb6 fix: disambiguate home-manager package from flake input to fix evaluation error 2026-04-13 15:11:09 +01:00
Bernardo Magri
b84693bc52 fix: remove invalid home-manager configuration from nixosConfigurations 2026-04-13 14:44:57 +01:00
Bernardo Magri
17de084789 fix: resolve standalone home-manager configuration and fix installer iso syntax 2026-04-13 14:42:52 +01:00
Bernardo Magri
1b75a440b1 fix: update nomarchy-test-vm to use the default flake configuration 2026-04-13 13:59:03 +01:00
Bernardo Magri
540718693f fix: revert to standalone Home Manager architecture for fast UI updates 2026-04-13 13:57:31 +01:00
Bernardo Magri
73ae1232f3 fix: switch from home-manager to nixos-rebuild for environment updates and align flake outputs 2026-04-13 13:46:12 +01:00
Bernardo Magri
6dd3c4b6e2 fix: include nomarchy flake in VM at /etc/nomarchy 2026-04-13 13:33:40 +01:00
Bernardo Magri
9746e75bc5 fix: dynamic flake path resolution and replace env-update/sys-update aliases with scripts 2026-04-13 13:25:54 +01:00
Bernardo Magri
866e556656 fix: bundle home-manager and nixos-rebuild with user scripts and fix theme-switching globbing error 2026-04-13 13:14:46 +01:00
Bernardo Magri
66096cbc46 feat: improve video configuration for VM and Live ISO 2026-04-13 13:05:59 +01:00
Bernardo Magri
8e4e801244 fix: rename and track Nomarchy.ttf font for flake build 2026-04-13 12:34:15 +01:00
Bernardo Magri
6f4741c060 fix: package theme engine and system scripts and fix env-update scriptability 2026-04-13 11:37:03 +01:00
Bernardo Magri
f0800e60ca fix: enable flakes and nix-command and set NIX_PATH for nix-shell 2026-04-13 11:33:07 +01:00
Bernardo Magri
ab9700f054 fixing summer-night waybar 2026-04-13 11:25:01 +01:00
Bernardo Magri
6b3e96b3b3 feat: add walker and rofi themes for summer-night and fix styling logic 2026-04-13 11:19:43 +01:00
Bernardo Magri
0e5fb6c813 fixing summer-night waybar 2026-04-13 08:37:50 +01:00
Bernardo Magri
f4ecaed31a docs: move STRUCTURE.md to docs/ and update README.md reference 2026-04-12 23:05:23 +01:00
Bernardo Magri
1853617f12 docs: add detailed STRUCTURE.md documentation 2026-04-12 23:04:26 +01:00
Bernardo Magri
ffdc67d246 fix: resolve 'outside /home/bernardo' build failure by avoiding directory symlink conflicts
- Update app configurations (btop, kitty, ghostty, opencode, lazygit, tmux) to manage individual files instead of entire directories.
- Use 'recursive = true' for chromium and elephant configurations to allow multiple modules to contribute to the same directory.
- This prevents conflicts when the theme loader tries to add themed config files into directories that were previously managed as monolithic symlinks.
2026-04-12 22:53:44 +01:00
Bernardo Magri
b3fb246ce3 fix: allow unfree packages to resolve VS Code build failure
- Add 'nixpkgs.config.allowUnfree = true' to core/system/default.nix for global NixOS configuration.
- Add 'nixpkgs.config.allowUnfree = true' to features/default.nix for Home Manager package set.
- This resolves evaluation errors when VS Code is included in the build.
2026-04-12 22:48:44 +01:00
Bernardo Magri
5f0834f30c refactor: consolidate app configurations and utility scripts
- Move 32+ app-specific scripts from features/apps/scripts/ to features/scripts/utils/ for centralized packaging.
- Create individual Nix modules for orphaned app configurations (btop, kitty, tmux, etc.) in features/apps/ using xdg.configFile.
- Fix broken paths in core/system/makima.nix and features/apps/vscode.nix.
- Update VSCode configuration to use the modern 'profiles.default.userSettings' API, resolving deprecation warnings.
- Merge duplicate 'nomarchy-launch-walker' scripts into a single robust utility.
- Remove stale root 'config/' directory.
- Update README.md and docs/creating-themes.md to reflect the new architecture and keybindings.
- Ensure all modules are correctly imported and verified via nix flake check.
2026-04-12 22:32:44 +01:00
Bernardo Magri
a7dbca80a6 fix: resolve VM startup failures, broken Hyprland functionality, and theme integration
- Fix QEMU syntax and root filesystem conflicts in vm-guest.nix.
- Repair numerous broken relative paths and imports across the codebase.
- Set 'summer-night' as the default distro theme with full branding integration.
- Implement declarative system-wide font installation including the 'nomarchy' font.
- Fix Waybar startup by dynamically generating theme-aware CSS.
- Restore Hyprland keybindings (Super+Return, Super+Space) and wallpaper loading.
- Add missing scripts: nomarchy-launch-walker, nomarchy-toggle-waybar, nomarchy-refresh-config.
- Enable UWSM and correctly disable conflicting Hyprland systemd services.
2026-04-12 20:54:03 +01:00
Bernardo Magri
bbdf34ced8 refactor: implement component-based architecture for enhanced maintainability
- Reorganize directory structure into core/, features/, and themes/
- Colocate application Nix logic, configs, scripts, and theme overrides
- Implement 'Inversion of Control' for theming: apps now pull theme-specific layouts
- Update flake.nix and shared library paths to match the new structure
- Document the new Feature-Centric architecture in README.md
2026-04-12 14:51:15 +01:00
Bernardo Magri
a9ee79a5ce fix: add stylix compatibility shims for missing program options
Stylix unconditionally imports all target modules, which expect certain
program options to exist even when those programs aren't enabled. This
causes evaluation errors.

Add stylix-compat.nix with stub options for:
- programs.neovim.initLua (maps to extraLuaConfig)
- programs.opencode.tui/themes

Also:
- Disable neovim/neovide stylix targets (we deploy theme lua via theme-loader)
- Set autoEnable = false to only enable explicitly listed targets
- Enable programs.neovim to satisfy stylix's neovim target
- Update stylix to latest version

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-11 20:20:32 +01:00
Bernardo Magri
b27fc5aee8 refactor: major architectural restructure for theme-centric organization
Theme System:
- Move all theme app configs to apps/ subdirectory (20 themes)
- Add theme-loader.nix for dynamic theme config deployment
- Simplify stylix.nix to focus on base theming only

Override System:
- Add overrides.nix for file-based config overrides
- Add behavior-configs.nix for non-visual configuration
- Split hypr/nomarchy.conf into behavior vs visual sections

Module Improvements:
- Add lib.mkDefault to all customizable settings
- Add modules/lib/ with shared utilities and state schema
- Update all home and system modules for downstream overridability

Installer:
- New minimal TTY installer (installer/install.sh)
- Golden path: BTRFS + LUKS2 (disko-golden.nix)
- New installer-iso.nix for TTY-only installation
- Keep graphical installer as installerIsoGraphical option

Cleanup:
- Remove obsolete install.sh, disko-ext4.nix, install-nomarchy.sh
- Update live-iso.nix references
- Add .claude/ to .gitignore for local IDE settings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-11 19:38:27 +01:00
Bernardo Magri
769fd88f25 fixing install.sh 2026-04-10 20:28:54 +01:00
Bernardo Magri
9f62f0f5f1 fixing install.sh 2026-04-10 20:25:58 +01:00
Bernardo Magri
7590fc4057 fix(install): fix gum syntax and TTY redirection in bootstrap script 2026-04-10 20:22:13 +01:00
Bernardo Magri
db18304fb6 fix(install): fix syntax errors, module references and branding in install script 2026-04-10 19:52:01 +01:00
Bernardo Magri
57580dbdb0 adding install script 2026-04-10 18:51:01 +01:00
Bernardo Magri
c6902d5b6d fixing hyprland errors 2026-04-09 13:38:00 +01:00
Bernardo Magri
ef54a4b67c fix: stabilize waybar with systemd and correct shebangs 2026-04-08 20:03:15 +01:00
Bernardo Magri
8ae026474f fix: provide declarative fallback for theme hyprland.conf 2026-04-08 19:26:34 +01:00
Bernardo Magri
1184cad61a fix: exclude ported apps from XDG auto-mapping to avoid collisions 2026-04-07 18:59:45 +01:00
Bernardo Magri
3ff6815ab0 refactor: rename Hyprland entrypoint to nomarchy.conf and finalize config sourcing 2026-04-07 18:57:21 +01:00
Bernardo Magri
98b7c99023 feat: enable Hyprland and wlroots logging for debugging 2026-04-06 22:18:20 +01:00
Bernardo Magri
d0f7e67d3d fix: add wrapQtAppsHook to SDDM theme derivation 2026-04-06 21:53:58 +01:00
Bernardo Magri
a6ec85d1ef fix: use proper settings attrset for hypridle 2026-04-06 21:52:07 +01:00
Bernardo Magri
eebec40ea0 minors 2026-04-06 21:50:44 +01:00
Bernardo Magri
0ce8602384 refactor: final architecture audit and hardening 2026-04-06 21:49:34 +01:00
Bernardo Magri
8b4e9ef6c8 cleanup: remove legacy config files and commit VM refactor 2026-04-06 21:46:08 +01:00
Bernardo Magri
a31023c037 refactor: systemic refactor for FHS compliance, native systemd migration, and script hardening 2026-04-06 21:45:33 +01:00
Bernardo Magri
5c45b10d88 refactor: unify SwayOSD and Hypridle configurations in Nix 2026-04-06 21:41:46 +01:00
Bernardo Magri
f5f515c2f7 refactor: strip redundant Alacritty theming in favor of Stylix 2026-04-06 21:41:30 +01:00
Bernardo Magri
358b129f0f refactor: harmonize Hyprland config by sourcing legacy hyprland.conf 2026-04-06 21:41:24 +01:00
Bernardo Magri
0065334164 cleanup: remove obsolete waybar and walker CSS templates 2026-04-06 21:41:14 +01:00
Bernardo Magri
45ca66119a refactor: unify Walker configuration into Nix and delete legacy TOML 2026-04-06 21:41:11 +01:00
Bernardo Magri
db8b009638 refactor: unify Waybar configuration using Nix and fix legacy paths 2026-04-06 21:40:50 +01:00
Bernardo Magri
3e1b1efa6f refactor: safe stylix wallpaper path interpolation 2026-04-06 21:39:17 +01:00
Bernardo Magri
db6bdd8495 refactor: move state migration to pre-flight, fix XDG hardcoding, and prevent Nix store bloat 2026-04-06 21:37:24 +01:00
Bernardo Magri
0194569a42 including new theme summer-night 2026-04-06 17:21:29 +01:00
Bernardo Magri
bb6b46b76e fix(system): finalize VM stabilization and fix Hyprland syntax
- Restore custom SDDM theme.
- Clean up all remaining Hyprland windowrulev2 and layerrule syntax errors.
- Optimize VM configurations with 4GB RAM and virtio-vga graphics for stability.
- Remove diagnostic debug services and autologin debug settings.
- Ensure correct session autologin to hyprland-uwsm.
2026-04-05 14:58:33 +01:00
Bernardo Magri
c336f528a8 fix(hyprland): proper rule syntax for 0.52.1 and re-enable autostart
- Removed 'on/off' suffixes from window rules.
- Replaced 'match:' with proper colon syntax for selectors.
- Re-enabled swww, waybar, and boot scripts.
2026-04-05 14:30:46 +01:00
Bernardo Magri
1fa60ed64a fix(vm): increase RAM to 8GB and fix Hyprland rule syntax to prevent crashes
- Increase VM memory to 8192MB to avoid OOM kills during session startup.
- Migrate all 'windowrule' to 'windowrulev2' in core configuration.
- Fix 'no_anim' syntax in layer rules.
- Re-enable graphics while keeping serial logs for debugging.
2026-04-05 14:17:52 +01:00
Bernardo Magri
c71cb7ea71 fix(sddm): use defaultSession instead of non-existent autoLogin.session 2026-04-05 13:27:08 +01:00
Bernardo Magri
70798abcb0 fix(vm): debug hang by disabling on-boot scripts and increasing resources
- Temporarily disable 'nomarchy-on-boot' and 'nomarchy-welcome' in Hyprland to isolate hang.
- Increase VM memory to 4096MB and cores to 4.
- Enable serial console debugging for VM.
- Enable qemuGuest service.
2026-04-05 13:23:20 +01:00
Bernardo Magri
663ee214d6 fix(vm): restore Plymouth splash and fix SDDM session selection
- Restore 'quiet' and 'splash' to kernel parameters to enable Plymouth.
- Re-enable graphics and virtio drivers for VM configurations.
- Add Interface=Qt5 to SDDM theme metadata for proper loading.
- Set default autoLogin.session to hyprland-uwsm to ensure correct session start.
- Enable services.xserver for improved display manager compatibility.
2026-04-05 13:22:09 +01:00
Bernardo Magri
ac6087559d fix(vm): ensure Plymouth display and fix black screen in Hyprland
- Force essential kernel parameters for VMs (video mode, splash).
- Add necessary virtio drivers to initrd.availableKernelModules.
- Fix black screen in Hyprland by disabling hardware cursors.
- Add fallback wallpaper logic to prevent swww crashes.
2026-04-05 12:48:43 +01:00
Bernardo Magri
2afd5eaa36 fix(vm): fix Plymouth theme path and optimize VM graphics for splash screen 2026-04-05 12:41:21 +01:00
Bernardo Magri
34c87d21ef fix(sddm): enable withUWSM for hyprland to resolve evaluation error 2026-04-05 11:21:47 +01:00
Bernardo Magri
9d36110123 fix(vm): fix Plymouth, SDDM, and autologin for VM testing
- Add virtio_gpu to initrd.kernelModules for early graphics support in VMs.
- Add 'render' group to VM users to ensure GPU acceleration.
- Move autologin defaults to sddm.nix to ensure they are consistently applied.
- Ensure SDDM theme has better session detection for uwsm.
2026-04-05 11:20:24 +01:00
Bernardo Magri
8a72a09bd8 fix(system): enable uwsm and fix session detection to allow VM login
- Enable programs.uwsm for session management.
- Improve SDDM theme session detection logic to be case-insensitive and more robust.
- Perform a global cleanup of 'Nnomarchy' and 'org.nnomarchy' typos across all scripts and configurations.
2026-04-05 11:18:41 +01:00
Bernardo Magri
7f086f07bf chore(branding): add missing icon.svg asset 2026-04-05 11:15:09 +01:00
Bernardo Magri
d59cb8f0ca fix(flake): set home-manager.useGlobalPkgs to false to resolve evaluation warnings 2026-04-05 11:15:02 +01:00
Bernardo Magri
854f429360 fix(bin): correct VM runner binary names and fix typos in test scripts 2026-04-05 11:10:57 +01:00
Bernardo Magri
64c1dc937d chore(branding): update fastfetch ASCII icon and fix branding typos
- Optimized assets/branding/icon.txt with multi-color placeholders for fastfetch.
- Updated config/fastfetch/config.jsonc to use the new multi-colored icon.
- Added icon and svg branding assets to modules/home/theme-files.nix.
- Fixed 'Nnomarchy' typo to 'Nomarchy' and updated branding paths in several scripts.
- Corrected screensaver and welcome scripts to use the centralized branding assets.
2026-04-05 11:06:42 +01:00
Bernardo Magri
514b305713 feat(system): comprehensive branding, styling, and system feature update
- Relocate themes to assets/themes/ and update all references.
- Implement custom SDDM theme and Plymouth theme enhancements.
- Add themed templates for Alacritty, Hyprland, Waybar, and other apps.
- Introduce Makima key remapper module and configuration.
- Add Voxtype and Walker configurations.
- Implement systemd power management and timeout optimizations.
- Add Nautilus-python extensions for LocalSend.
- Update branding assets and ASCII art integration.
2026-04-05 10:52:41 +01:00
Bernardo Magri
9d5049aed5 chore(hygiene): final script cleanup and plymouth optimization
- Remove unused pkg and cmd helper scripts
- Optimize Plymouth settings for cleaner boot in all environments
- Skip hardware auto-detection logic in Live ISO environment
2026-04-04 21:34:02 +01:00
Bernardo Magri
4abd4d4686 chore(todo): add project TODO list and improve Plymouth LUKS support 2026-04-04 20:42:20 +01:00
Bernardo Magri
e3d8c9ca75 feat(branding): professionalize installer and system branding
- Refactor installer with Gum for a professional interactive experience
- Create custom Nomarchy Plymouth theme with centered logo
- Establish assets/branding directory for official logos and ASCII art
- Update Fastfetch config with official ASCII art and declarative stats
- Declaratively link branding assets via Home Manager
2026-04-04 20:34:32 +01:00
435 changed files with 9447 additions and 9831 deletions

18
.gitignore vendored
View File

@@ -1,13 +1,13 @@
# ---> Nix
# Ignore build outputs from performing a nix-build or `nix build` command
# Study material from the previous iteration — not part of the flake.
# Delete the directory once everything worth porting has been ported.
old_distro/
# Nix build artifacts
result
result-*
# Ignore automatically generated direnv output
.direnv
__pycache__/
.DS_Store
# VM and ISO artifacts
*.qcow2
*.qcow
*.iso
# Claude Code machine-local settings (permissions etc.)
.claude/settings.local.json

View File

@@ -1,40 +0,0 @@
# Nomarchy - A NixOS-based distribution with Omarchy flavour - Agent Build Blueprint
## System Architecture Overview
Nomarchy uses a **Modular Merging Architecture**. The distro is distributed as a Nix Flake that exports two primary modules: `nixosModules.system` and `nixosModules.home`. This approach ensures strict separation between the "Upstream" core and the "Downstream" user configuration.
Users interact with the system by importing the distro's modules into their own `flake.nix` and then layering their own personal modules (`system.nix` and `home.nix`) on top. This follows the native NixOS design pattern for declarative, multi-module systems.
## Directory Structure
* `flake.nix` (Master entry point with core modules and test configurations)
* `installer/install-nomarchy.sh` (Interactive installer generating a clean downstream flake)
* `modules/system/default.nix` (Distro-wide OS defaults: SDDM, Plymouth, Audio, Network)
* `modules/home/default.nix` (Distro-wide user environment: Hyprland, Waybar, Styling)
* `bin/` (The collection of Omarchy productivity and config scripts)
* `themes/` (Distro-wide color palettes and backgrounds)
## Core Components & Logic
### 1. Separation of Concerns (Upstream vs. Downstream)
* **Upstream:** The `nomarchy/` directory contains the core logic. It is treated as an immutable input by the target system.
* **Downstream:** The user's `/etc/nixos/flake.nix` imports the upstream modules. The user's personal customizations are kept in `/etc/nixos/system.nix` and `/etc/nixos/home.nix`.
* **Merging:** NixOS automatically merges definitions. For example, if both the distro and the user add packages to `home.packages`, the final system includes the union of both lists.
### 2. The Interactive Installer (`installer/install-nomarchy.sh`)
The installer is designed to bootstrap a fresh system with this modular structure:
1. **Repo Detection:** Identifies the location of the Nomarchy source.
2. **Scaffolding:** Creates a new downstream `flake.nix` that imports Nomarchy core modules.
3. **User Files:** Generates skeleton `system.nix` and `home.nix` files for the user to customize.
4. **Flake Updates:** Uses the public Git repository as the upstream source, allowing users to update their system via `nix flake update`.
### 3. Home Manager Integration
* **Hybrid Declarative State:** While the distro is declarative, it uses state files in `~/.config/home-manager/` (managed by the distro's scripts) to allow for instant UI feedback (theming, fonts, wallpapers) without needing a full system rebuild for every small tweak.
* **Script Wrapping:** All scripts in `bin/` are wrapped with their specific dependencies (`swayosd`, `pulseaudio`, `jq`, etc.) to ensure they work reliably across different hardware.
### 4. Dynamic Theming
* **Palettes:** Themes are defined in simple `colors.toml` files. The distro dynamically generates Base16 palettes from these, allowing for infinite theme expansion without modifying Nix code.
## Verification & Build
* **Test Installer:** `./bin/nomarchy-test-installer` (Builds a VM of the installer environment).
* **Check Integrity:** `nix flake check --impure` (Verifies all configurations evaluate).
* **Build ISO:** `nix build .#nixosConfigurations.installerIso.config.system.build.isoImage` (Generates the flashable USB image).

414
README.md
View File

@@ -1,96 +1,362 @@
# 👑 Nomarchy
# Nomarchy
**Nomarchy** is a professional-grade NixOS distribution that replicates the Omarchy Wayland workflow with a strictly declarative, flake-based architecture. It provides a highly polished, "it just works" experience for power users who want a beautiful Hyprland environment without sacrificing the reliability of NixOS.
**The rock-solid reproducibility of NixOS 26.05. The out-of-the-box polish of
Omarchy/Omakub.** One JSON file rules the look of the entire desktop; every
theme change is a Home Manager generation — atomic, rollbackable, never
partial.
## ✨ Key Features
- **Purely Declarative:** Your entire desktop—themes, fonts, wallpapers, and toolchains—is defined in code.
- **Modular Merging Architecture:** Distro code and user code are strictly separated. You can update the distro core without ever touching or breaking your personal configurations.
- **Interactive "Smart" Installer:** Detects hardware, sets up networking, localizes timezones/keymaps, and offers multi-select software profiles.
- **Erase Your Darlings (Optional):** Optional BTRFS root-wipe on boot ensures your system stays pristine and 100% declarative.
- **Dynamic Theming Engine:** 20+ built-in themes with instant UI feedback via IPC (swww, waybar, and stylix).
- **Portable State (`nomarchy-sync`):** Easily backup and sync your declarative config and dynamic state (theme/wallpaper choices) to a private Git repo.
---
## 📥 Installation
### 1. Try it in a VM (Recommended)
Verify the experience without touching your hardware:
```bash
./bin/nomarchy-test-installer
```
This builds a full graphical VM of the installer environment. Once inside, click the **Install Nomarchy** icon or run `sudo /etc/install-nomarchy.sh`.
### 2. Build the Installer ISO
To install on physical hardware, generate your own bootable image:
```bash
nix build .#nixosConfigurations.installerIso.config.system.build.isoImage
┌──────────────────────────────────────────────────────────────────────────┐
│ theme-state.json (single source of truth) │
│ lives INSIDE your flake checkout, git-tracked │
└───────────────────────────────────┬──────────────────────────────────────┘
nomarchy-theme-sync apply gruvbox
1. merges the preset into the JSON (atomic write)
2. runs `home-manager switch` (no sudo, no system rebuild)
▼ pure read (nomarchy.stateFile)
┌──────────────────────────────────────────────────────────────────────────┐
│ Home Manager bakes EVERYTHING into one read-only generation: │
│ Hyprland (colors/gaps/borders) Waybar (palette or whole-swap) │
│ Ghostty (full ANSI palette) btop (asset or generated) │
│ Stylix → GTK, Qt, cursors, fonts │
└───────────────────────────────────┬──────────────────────────────────────┘
wallpaper via awww (the one runtime piece:
applied post-switch + at session start, `bg next` cycles)
```
The ISO will be located at `./result/iso/nixos-*.iso`. Flash it to a USB drive and boot.
### 3. Run the Installer
Once booted into the Live environment, launch the installer:
```bash
sudo /etc/install-nomarchy.sh
## 1. Layout
Flat on purpose. Two module trees, one options file each, no hidden layers.
```
.
├── flake.nix # inputs + the downstream API (exports below)
├── lib.nix # nomarchy.lib.mkFlake — one-call downstream wrapper
├── theme-state.json # ★ THE single source of truth (git-tracked!)
├── themes/ # 21 presets: <slug>.json + optional <slug>/ assets
│ ├── nord.json # palette (required, works alone)
│ └── nord/ # assets (optional, fixed filenames)
│ ├── backgrounds/ # wallpapers (auto-picked, SUPER+SHIFT+T cycles)
│ ├── btop.theme # hand-made config drop (else generated)
│ └── waybar.css # whole-swap: replaces the generated bar style
├── modules/
│ ├── nixos/ # the distro, system side
│ │ ├── default.nix # Hyprland session, Pipewire, greetd, fonts
│ │ ├── options.nix # nomarchy.system.* toggles
│ │ ├── plymouth.nix # boot splash, tinted from the JSON
│ │ ├── file-manager.nix # Thunar GUI + gvfs/tumbler/udisks2
│ │ └── power.nix # power-profiles-daemon/TLP, thermald, charge limit
│ └── home/ # the distro, user side
│ ├── default.nix # entry point
│ ├── options.nix # nomarchy.* option surface
│ ├── theme.nix # JSON ingestion + wallpaper hook
│ ├── stylix.nix # GTK/Qt/cursors/fonts from the same JSON
│ ├── hyprland.nix # all JSON-driven
│ ├── waybar.nix
│ ├── ghostty.nix
│ ├── btop.nix
│ ├── rofi.nix # launcher + nomarchy-menu (calc, emoji, clip…)
│ ├── keybinds.nix # single source: Hyprland binds + SUPER+? sheet
│ ├── swaync.nix # notifications, same JSON
│ ├── idle.nix # hyprlock + hypridle, same JSON
│ ├── yazi.nix # flagship TUI file manager + plugins
│ ├── osd.nix # swayosd volume/brightness OSD
│ ├── shell.nix # zsh + starship + bat/eza/zoxide
│ ├── keys.nix # gpg-agent fronting SSH, pinentry-qt
│ └── fastfetch.nix # themed Nomarchy logo + system info
├── hosts/
│ ├── default/ # reference machine (thin: boot, user, hostname)
│ └── live.nix # bootable live ISO (try the distro, no install)
├── pkgs/
│ ├── nomarchy-theme-sync/ # state writer + rebuild dispatcher (Python)
│ └── nomarchy-install/ # live-ISO installer (gum + disko + mkFlake)
├── templates/downstream/ # `nix flake init -t` starter for users
├── docs/TESTING.md # how to verify changes (incl. AI-agent rules)
├── docs/OVERRIDES.md # how downstream users override defaults
├── docs/ROADMAP.md # forward-looking plans + shipped-fixes log
└── tools/ # maintainer-only
├── import-palettes.py # converts old-distro themes → JSON + assets
├── test-live-iso.sh # build the ISO + boot it in QEMU
├── test-install.sh # full offline-install regression in QEMU
└── vm/ # headless-VM helpers (QMP keys, VNC shots,
# offline-pin gap analysis)
```
The wizard will guide you through:
- **Networking:** An interactive wizard to connect to Wi-Fi if needed.
- **Hardware:** Optimized profiles for Dell XPS, Framework, Apple T2, and more.
- **Storage:** Choice between Standard Ext4 or Encrypted BTRFS with optional **Impermanence**.
- **Localization:** Searchable timezones and keyboard layout selection.
- **Profiles:** One-click setups for Development, Gaming, and Media Production.
---
**Rule of thumb:** `modules/` is the distro (reusable, no machine specifics),
`hosts/` is a machine, `themes/` is data, `pkgs/` is code, `tools/` is
maintainer-only. If a new file doesn't obviously belong to one of those, it
probably shouldn't exist.
## 🛠️ Configuration & Usage
## 2. Try it first (live ISO)
Nomarchy uses a "Downstream" model. After installation, your configuration lives in `/etc/nixos/` and is split into three main parts:
Boot the full desktop from a USB stick or VM without installing anything:
### 1. Distro Core (Upstream)
Managed via the public Git repository. This is the engine. You should generally not modify files here.
```sh
nix build .#nixosConfigurations.nomarchy-live.config.system.build.isoImage
# → result/iso/*.iso — dd to a stick, or boot it in QEMU:
tools/test-live-iso.sh
```
The live session auto-logs-in, seeds the flake at `~/.nomarchy`, and pins
the locked inputs into the ISO store — so theme switching (including the
`home-manager switch` it triggers) works **offline**, exactly like on an
installed system. Verification checklist: [docs/TESTING.md](docs/TESTING.md).
Like what you see? **`nomarchy-install`** (in a terminal) walks you through
installing to disk: pick a disk, LUKS2 full-disk encryption **by default**
(in exchange the desktop logs in passwordless — the passphrase already
gates the machine), user + hostname + timezone, hardware autodetection
(DMI → nixos-hardware profile), a hibernation-ready swapfile sized to RAM,
then disko partitions (GPT + ESP + BTRFS subvolumes incl. `@snapshots`
snapper timeline snapshots are on) and `nixos-install` runs — **without a
network** when the ISO was built from a clean tree (the target's
`flake.lock` is composed from the rev the ISO carries). The installed
machine gets the standard downstream layout: the flake at `~/.nomarchy`
(`/etc/nixos` symlinks to it), one `mkFlake` call, your
`system.nix`/`home.nix`. First boot lands in the fully themed desktop —
the installer pre-activates the Home Manager generation. UEFI only for now.
## 3. Using Nomarchy on your machine (downstream)
Nomarchy is consumed as a flake input — you never fork or edit this repo:
```sh
mkdir my-machine && cd my-machine
nix flake init -t "git+https://git.bemagri.xyz/bernardo/nomarchy.git?ref=v1"
```
You own two files day-to-day: `system.nix` and `home.nix` (plus
`theme-state.json`, written by the CLI). Your `flake.nix` is set up once —
later by the installer — and never hand-edited; it's a single call:
### 2. Your System (`system.nix`)
Add system-wide packages, services, and hardware tweaks here.
*Example: Adding a persistent directory for Docker if using Impermanence:*
```nix
environment.persistence."/persist" = {
directories = [ "/var/lib/docker" ];
};
outputs = { nomarchy, ... }:
nomarchy.lib.mkFlake {
src = ./.;
username = "me";
hardwareProfile = "framework-13-7040-amd"; # optional, nixos-hardware name
};
```
### 3. Your User Environment (`home.nix`)
Add user-level packages, aliases, and dotfiles here.
*Example: Overriding the default terminal:*
```nix
nomarchy.home.terminal = "kitty";
| `mkFlake` arg | Default | Purpose |
|---|---|---|
| `src` | — (required) | Your flake directory (`./.`) |
| `username` | — (required) | Login name; flows into `system.nix` and names the HM config |
| `hardwareProfile` | `null` | One [nixos-hardware](https://github.com/NixOS/nixos-hardware) module name, or a list of them (pinned + tested by Nomarchy; unknown names fail with suggestions) |
| `system` | `"x86_64-linux"` | Platform |
(Power users can skip `mkFlake` and wire `nixosModules.nomarchy` /
`homeModules.nomarchy` / `overlays.default` by hand — the wrapper is sugar.)
Two deliberately separate rebuild paths:
```sh
sudo nixos-rebuild switch --flake .#default # system: rare
home-manager switch --flake .#me # desktop: every theme change, no sudo
```
### Applying Changes
After editing your files, apply them instantly:
```bash
sys-update # Rebuilds the NixOS system
env-update # Reloads your Home Manager environment
Day-to-day you'll use the shipped shortcuts instead:
```sh
sys-update # nix flake update + system rebuild (BTRFS snapshot first when available)
home-update # home-manager switch (no flake update, no sudo)
```
---
**Order matters when pulling distro updates.** `home-update` does *not*
touch the lock — it rebuilds the desktop against the **current**
`flake.lock`. A new Nomarchy revision (new keybinds, theming, modules)
arrives only when the lock is updated, which `sys-update` does
(`nix flake update`). So to pull an update that affects the desktop layer:
run `sys-update` **first** (updates the lock + rebuilds the system), **then**
`home-update` (re-applies the desktop against the new lock). Doing them in
the other order rebuilds the desktop against the *old* inputs and silently
skips the new home-side changes. After a home-side keybind/config change,
also `hyprctl reload` (or relogin) so the running session re-reads it.
## 🚀 Commands & Keybindings
Override anything via the `nomarchy.*` surface or plain NixOS/HM options:
appearance (gaps/colors/fonts) changes through `nomarchy-theme-sync`,
behaviour (input/misc/monitor/chrome) is `mkDefault` so a plain `home.nix`
assignment wins, and bind/exec-once lists concatenate. Full guide with
examples: **[docs/OVERRIDES.md](docs/OVERRIDES.md)**.
| Keybinding | Action |
| :--- | :--- |
| `Super + Alt + Space` | **Theme Selector** (Walker) |
| `Super + Ctrl + Space` | **Font Selector** |
| `Super + Shift + Space`| **Wallpaper Selector** |
| `Super + Space` | **App Launcher** (Walker) |
| `Super + Return` | Open Terminal |
| `Super + Q` | Close Window |
| Option | Default | Purpose |
|---|---|---|
| `nomarchy.stateFile` | — (required) | Path to your theme-state.json |
| `nomarchy.terminal` | `"ghostty"` | Terminal for keybinds and `$TERMINAL` |
| `nomarchy.keyboard.layout` | `"us"` | XKB layout for the Hyprland session (installer writes the matching `services.xserver.xkb` in system.nix; the console + LUKS prompt follow via the distro default) |
| `nomarchy.keyboard.variant` | `""` | XKB variant for the session |
| `nomarchy.keyboard.devices` | `{}` | Per-device layout overrides (Hyprland `device` blocks keyed by `hyprctl devices` name) — e.g. an external keyboard with its own layout/variant |
| `nomarchy.keyboard.layouts` | `[]` | Extra candidate layouts; when set, a watcher prompts (rofi) for a layout on a newly-connected keyboard and remembers it per-device |
| `nomarchy.nightlight.enable` | `false` | Scheduled blue-light filter (hyprsunset) — warm at night (`.temperature`, default 4000K) between `.sunset`/`.sunrise`, no shift by day |
| `nomarchy.hyprland.enable` | `true` | Nomarchy's Hyprland config |
| `nomarchy.waybar.enable` | `true` | Nomarchy's Waybar |
| `nomarchy.rofi.enable` | `true` | Themed rofi launcher + `nomarchy-menu` dispatcher |
| `nomarchy.swaync.enable` | `true` | swaync notifications, themed |
| `nomarchy.idle.enable` | `true` | hyprlock + hypridle (idle lock 5 min, display off 10, suspend 30) |
| `nomarchy.yazi.enable` | `true` | yazi TUI file manager, themed + curated plugins |
| `nomarchy.osd.enable` | `true` | swayosd on-screen display for volume/brightness/mute |
| `nomarchy.shell.enable` | `true` | zsh + starship prompt + bat/eza/zoxide (zsh is the default login shell) |
| `nomarchy.ghostty.enable` | `true` | Nomarchy's Ghostty |
| `nomarchy.btop.enable` | `true` | btop with per-theme colors |
| `nomarchy.stylix.enable` | `true` | GTK/Qt/cursor theming |
| `nomarchy.fastfetch.enable` | `true` | fastfetch fronted by the themed Nomarchy logo |
| `nomarchy.keys.enable` | `true` | gpg-agent fronting SSH + pinentry-qt |
| `nomarchy.displays.enable` | `true` | nwg-displays interactive monitor arranger (helper for `nomarchy.monitors`) |
| `nomarchy.monitors` | `[]` | Declarative per-output layout → Hyprland `monitor` rules (applied on hotplug); `,preferred,auto,1` wildcard kept as fallback |
| `nomarchy.themesDir` | Nomarchy's `themes/` | Where per-theme app overrides are probed |
| `nomarchy.system.plymouth.enable` | `true` | Branded boot splash, background from the theme JSON (recolors on system rebuilds) |
| `nomarchy.system.fileManager.enable` | `true` | Thunar GUI + gvfs/tumbler/udisks2 (the "open folder" handler) |
| `nomarchy.system.greeter.enable` | `true` | greetd/tuigreet |
| `nomarchy.system.greeter.autoLogin` | `null` | Auto-login this user into Hyprland (installer sets it on LUKS machines) |
| `nomarchy.system.audio.enable` | `true` | Pipewire stack |
| `nomarchy.system.bluetooth.enable` | `true` | Bluetooth + blueman |
| `nomarchy.system.snapper.enable` | `false` | Hourly/daily BTRFS timeline snapshots + `nixos-rebuild-snap` (installer enables it; no-op unless root is BTRFS) |
| `nomarchy.system.power.enable` | `true` | Active power management (see below) |
| `nomarchy.system.power.backend` | `"ppd"` | `"ppd"` (power-profiles-daemon + menu/Waybar switcher) or `"tlp"` (deeper battery tuning, no switcher) — mutually exclusive |
| `nomarchy.system.power.laptop` | `false` | Marks a laptop, gating battery-only features; the installer sets it when a battery is present |
| `nomarchy.system.power.thermal.enable` | `false` | thermald (Intel-only); the installer enables it on a GenuineIntel CPU |
| `nomarchy.system.power.batteryChargeLimit` | `null` | Stop charging at this % (e.g. `80`) where the hardware supports it; needs `power.laptop` |
| `nomarchy.services.tailscale.enable` | `false` | Opt-in: Tailscale mesh VPN (then `sudo tailscale up`) |
| `nomarchy.services.syncthing.enable` | `false` | Opt-in: Syncthing file sync as the login user (GUI at `127.0.0.1:8384`) |
| `nomarchy.services.podman.enable` | `false` | Opt-in: rootless Podman (`docker` aliased to it) |
| `nomarchy.services.flatpak.enable` | `false` | Opt-in: Flatpak + the Flathub remote |
| `nomarchy.services.pika.enable` | `false` | Opt-in: Pika Backup (GUI Borg backups) |
| `nomarchy.services.steam.enable` | `false` | Opt-in: Steam via `programs.steam` (32-bit libs, controller udev, Remote-Play ports) |
| `nomarchy.services.libvirt.enable` | `false` | Opt-in: libvirt/KVM + virt-manager GUI (login user added to `libvirtd`) |
| `nomarchy.services.obs.enable` | `false` | Opt-in: OBS Studio + a v4l2loopback virtual camera (selectable as a webcam in Zoom/Teams) |
| `nomarchy.services.docker.enable` | `false` | Opt-in: rootful Docker (user in `docker` group); don't enable alongside podman |
| `nomarchy.services.kdeconnect.enable` | `false` | Opt-in: KDE Connect phone integration (opens its firewall ports) |
| `nomarchy.services.gamemode.enable` | `false` | Opt-in: Feral GameMode performance daemon (`gamemoderun`) |
| `nomarchy.services.adb.enable` | `false` | Opt-in: Android adb/fastboot tools (systemd handles device udev rules) |
| `nomarchy.services.wireshark.enable` | `false` | Opt-in: Wireshark Qt GUI (user in `wireshark` group, capture without root) |
| `nomarchy.services.ollama.enable` | `false` | Opt-in: Ollama local LLM runtime on `127.0.0.1:11434` (CPU; GPU via `services.ollama.acceleration`) |
| `nomarchy.services.printing.enable` | `false` | Opt-in: CUPS + Avahi/mDNS network printer discovery |
| `nomarchy.services.openrgb.enable` | `false` | Opt-in: OpenRGB daemon for RGB peripheral/motherboard lighting |
| `nomarchy.services.restic.enable` | `false` | Opt-in: scheduled daily restic backup (set `.repository` + `.passwordFile`; 7/4/6 retention; list/restore via the `restic-nomarchy` wrapper) |
### Utility Scripts
Nomarchy includes 150+ productivity scripts available in your PATH:
- `nomarchy-sync push <repo>`: Backup your setup to Git.
- `nomarchy-theme-bg-next`: Cycle to the next wallpaper in the current theme.
- `nomarchy-doctor`: (Coming Soon) Diagnose system health and state.
Beyond the `nomarchy.*` surface, the system layer turns on the usual
desktop services with `lib.mkDefault` (override natively). One worth
calling out: **`services.fwupd.enable`** is on by default for firmware
updates via LVFS — it only refreshes metadata, never flashes on its own,
so run `fwupdmgr update` to apply. Disable with `services.fwupd.enable =
false;` on machines without real firmware (VMs/headless).
---
*Built with ❤️ using NixOS, Hyprland, Stylix, and the spirit of Omarchy.*
## 4. How theming works
### Pure JSON ingestion
The trap with "read a mutable file from Nix" is pure evaluation: flakes
cannot read arbitrary `$HOME` paths without `--impure` (the old prototype
required it — never again). Nomarchy's convention: **the state file lives
inside the consuming flake** and is wired via
`nomarchy.stateFile = ./theme-state.json;`. Reading it is pure — it's flake
source. It must be git-tracked (`nomarchy-theme-sync` runs
`git add --intent-to-add` after every write as a safety net).
### One change = one generation
`nomarchy-theme-sync apply <theme>` merges the preset into the JSON and runs
`home-manager switch` (override the command with `$NOMARCHY_REBUILD`, or pass
`--no-switch` to only write). Everything is baked: Hyprland, Waybar, Ghostty,
btop, and — via Stylix, mapped onto base16 roles — GTK, Qt, cursors and
fonts. No runtime patching means no partial states, and `home-manager
generations` is also your theme history. Waybar even restyles in place: it
re-reads `style.css` when the symlink flips.
The **wallpaper** is the one runtime piece (awww — nixpkgs' swww — is
imperative; nothing in Nix consumes the path): applied at session start and
after every switch via a tiny activation hook, cycled instantly with
`bg next`.
### Per-theme app assets (`themes/<slug>/`)
Recoloring covers 95% of theming; the rest is one optional assets directory
per theme — a single place to look, unlike the old distro's split:
| Asset | Mechanism |
|---|---|
| `backgrounds/` | wallpapers; empty `wallpaper` in the state means "first one"; `bg next` cycles |
| `btop.theme` | baked into the generation (generated from the palette when absent) |
| `waybar.css` | **whole-swap**: replaces the generated bar style entirely (probed at eval time, self-contained) |
| `waybar.jsonc` | whole-swap for the bar *layout* (must be plain JSON) |
| `rofi.rasi` | **whole-swap**: replaces the generated launcher/menu theme entirely |
Six ported themes ship a `waybar.css` identity (catppuccin, lumon, nord,
retro-82, summer-day, summer-night). Custom user themes can live in
`$NOMARCHY_PATH/themes/` (preset lookup) and `nomarchy.themesDir` (eval-time
asset probe).
## 5. Day-to-day
```sh
nomarchy-theme-sync list # 21 presets (nord, gruvbox, rose-pine, …)
nomarchy-theme-sync apply kanagawa # whole desktop, one generation (~a switch)
nomarchy-theme-sync set ui.gapsOut 16 # tweak one knob (also a switch)
nomarchy-theme-sync bg next # cycle wallpapers — instant, no rebuild
nomarchy-theme-sync bg auto # back to the theme's default wallpaper
nomarchy-theme-sync get colors.accent
sys-update # update inputs + rebuild the system (snapshots first)
home-update # rebuild just the desktop layer
```
Keybinds: `SUPER+Return` terminal · `SUPER+D` launcher · `SUPER+T` theme
picker · `SUPER+SHIFT+T` next wallpaper · `SUPER+X` power menu ·
`SUPER+E` file manager (yazi) · `SUPER+N` notifications · `SUPER+CTRL+V`
clipboard history · `SUPER+Q`
close · `SUPER+1..9` workspaces · `Print` region screenshot.
Shell aliases (zsh, gated on `nomarchy.shell.enable`) — `alias` lists them
all; the curated set:
```sh
# navigation
.. ... .... # cd up 1 / 2 / 3 levels
# git
g gst # git · git status -sb
ga gaa # git add · git add -A
gc gcm # git commit · git commit -m
gco gsw gb # checkout · switch · branch
gd gds # diff · diff --staged
gl glg # log graph (last 20 · all branches)
gp gpl gf # push · pull · fetch --all --prune
# nix (system/home rebuilds keep their full sys-update / home-update names)
ns nr # nix shell · nix run (e.g. ns nixpkgs#ripgrep)
nfu nfc # nix flake update · check
nsearch ngc # nix search nixpkgs · nix-collect-garbage -d
# misc
path # print $PATH, one entry per line
reload # exec zsh (reload the shell)
```
## 6. Extending
- **New theme:** drop a JSON into `themes/` (schema = any existing preset),
plus an optional `themes/<slug>/` assets directory.
- **New themed value:** add the key to `theme-state.json` and consume it in
the Nix modules. One place — there is no second renderer to keep in sync.
- **Importing more old-distro palettes:**
`tools/import-palettes.py <palettes-dir> themes/`.
- **New opt-in feature (convention):** when a feature is off by default and
needs the user to set `nomarchy.*` options (e.g. night light, per-device
keyboard layouts, monitor layout, power management), ship a **commented**
example of it in `templates/downstream/home.nix` or `system.nix`. New
installs then enable it by uncommenting + tweaking, rather than hunting the
docs for the option name.
- **Applications:** the starter complete-workstation set (LibreOffice, VS
Code, GIMP, Inkscape) lives in the `home.packages` list in your
`home.nix` — it's a plain package list, so curate it directly: delete a
line to slim the machine, uncomment an extra (a browser, email, full TeX
Live), or add your own. No `nomarchy.apps.*` toggles — a package list is
already its own opt-out, so the distro doesn't impose these or wrap them.
## Roadmap & known issues
See **[docs/ROADMAP.md](docs/ROADMAP.md)** — forward-looking plans plus the
log of shipped fixes. Kept out of the README so this stays a focused entry
point.

View File

@@ -1,11 +0,0 @@
#!/bin/bash
# Returns the battery full capacity in Wh (rounded to whole number).
# Used by nomarchy-battery-status for displaying battery capacity.
battery_info=$(upower -i $(upower -e | grep BAT))
echo "$battery_info" | awk '/energy-full:/ {
printf "%d", $2
exit
}'

View File

@@ -1,24 +0,0 @@
#!/bin/bash
# Designed to be run by systemd timer every 30 seconds and alerts if battery is low
BATTERY_THRESHOLD=10
NOTIFICATION_FLAG="/run/user/$UID/nomarchy_battery_notified"
BATTERY_LEVEL=$(nomarchy-battery-remaining)
BATTERY_STATE=$(upower -i $(upower -e | grep 'BAT') | grep -E "state" | awk '{print $2}')
send_notification() {
notify-send -u critical "󱐋 Time to recharge!" "Battery is down to ${1}%" -i battery-caution -t 30000
nomarchy-hook battery-low "$1"
}
if [[ -n $BATTERY_LEVEL && $BATTERY_LEVEL =~ ^[0-9]+$ ]]; then
if [[ $BATTERY_STATE == "discharging" ]] && (( BATTERY_LEVEL <= BATTERY_THRESHOLD )); then
if [[ ! -f $NOTIFICATION_FLAG ]]; then
send_notification $BATTERY_LEVEL
touch $NOTIFICATION_FLAG
fi
else
rm -f $NOTIFICATION_FLAG
fi
fi

View File

@@ -1,13 +0,0 @@
#!/bin/bash
# Returns true if a battery is present on the system.
# Used by the battery monitor and other battery-related checks.
for bat in /sys/class/power_supply/BAT*; do
[[ -r $bat/present ]] &&
[[ $(cat $bat/present) == "1" ]] &&
[[ $(cat $bat/type) == "Battery" ]] &&
exit 0
done
exit 1

View File

@@ -1,9 +0,0 @@
#!/bin/bash
# Returns the battery percentage remaining as an integer.
# Used by the battery monitor and the Ctrl + Shift + Super + B hotkey.
upower -i $(upower -e | grep BAT) | awk '/percentage/ {
print int($2)
exit
}'

View File

@@ -1,25 +0,0 @@
#!/bin/bash
# Returns the battery time remaining (to empty or full) in a compact format.
battery_info=$(upower -i $(upower -e | grep BAT))
echo "$battery_info" | awk '/time to (empty|full)/ {
value = $4
unit = $5
if (unit == "minutes") {
hours = int(value / 60)
minutes = int(value % 60)
} else {
hours = int(value)
minutes = int((value - hours) * 60)
}
if (hours > 0 && minutes > 0) {
printf "%dh %dm", hours, minutes
} else if (hours > 0) {
printf "%dh", hours
} else {
printf "%dm", minutes
}
exit
}'

View File

@@ -1,28 +0,0 @@
#!/bin/bash
# Returns a formatted battery status string with percentage and power draw/charge.
# Used by the battery notification hotkey (Ctrl + Shift + Super + B).
battery_info=$(upower -i $(upower -e | grep BAT))
percentage=$(echo "$battery_info" | awk '/percentage/ {
print int($2)
exit
}')
power_rate=$(echo "$battery_info" | awk '/energy-rate/ {
rounded = sprintf("%.1f", $2)
sub(/\.0$/, "", rounded)
print rounded
exit
}')
state=$(echo "$battery_info" | awk '/state/ { print $2; exit }')
time_remaining=$(nomarchy-battery-remaining-time)
capacity=$(nomarchy-battery-capacity)
if [[ $state == "charging" ]]; then
echo "󰁹 Battery ${percentage}% · ${time_remaining} to full ·  ${power_rate}W / ${capacity}Wh"
else
echo "󰁹 Battery ${percentage}% · ${time_remaining} left ·  ${power_rate}W / ${capacity}Wh"
fi

View File

@@ -1,21 +0,0 @@
#!/bin/bash
# Adjust brightness on the most likely display device.
# Usage: nomarchy-brightness-display <step>
step="${1:-+5%}"
# Start with the first possible output, then refine to the most likely given an order heuristic.
device="$(ls -1 /sys/class/backlight 2>/dev/null | head -n1)"
for candidate in amdgpu_bl* intel_backlight acpi_video*; do
if [[ -e /sys/class/backlight/$candidate ]]; then
device="$candidate"
break
fi
done
# Set the actual brightness of the display device.
brightnessctl -d "$device" set "$step" >/dev/null
# Use SwayOSD to display the new brightness setting.
nomarchy-swayosd-brightness "$(brightnessctl -d "$device" -m | cut -d',' -f4 | tr -d '%')"

View File

@@ -1,12 +0,0 @@
#!/bin/bash
# Adjust the brightness on Apple Studio Displays and Apple XDR Displays using asdcontrol.
if (( $# == 0 )); then
echo "Adjust Apple Display Brightness by passing +5000 or -5000 (or any range from 0-60000)"
else
device="$(sudo asdcontrol --detect /dev/usb/hiddev* | grep ^/dev/usb/hiddev | cut -d: -f1)"
sudo asdcontrol "$device" -- "$1" >/dev/null
value="$(sudo asdcontrol "$device" | awk -F= '/BRIGHTNESS=/{print $2+0}')"
nomarchy-swayosd-brightness "$(( value * 100 / 60000 ))"
fi

View File

@@ -1,42 +0,0 @@
#!/bin/bash
# Adjust keyboard backlight brightness using available steps.
# Usage: nomarchy-brightness-keyboard <up|down|cycle>
direction="${1:-up}"
# Find keyboard backlight device (look for *kbd_backlight* pattern in leds class).
device=""
for candidate in /sys/class/leds/*kbd_backlight*; do
if [[ -e $candidate ]]; then
device="$(basename "$candidate")"
break
fi
done
if [[ -z $device ]]; then
echo "No keyboard backlight device found" >&2
exit 1
fi
# Get current and max brightness to determine step size.
max_brightness="$(brightnessctl -d "$device" max)"
current_brightness="$(brightnessctl -d "$device" get)"
# Calculate step as one unit (keyboards typically have discrete levels like 0-3).
if [[ $direction == "cycle" ]]; then
new_brightness=$(( (current_brightness + 1) % (max_brightness + 1) ))
elif [[ $direction == "up" ]]; then
new_brightness=$((current_brightness + 1))
(( new_brightness > max_brightness )) && new_brightness=$max_brightness
else
new_brightness=$((current_brightness - 1))
(( new_brightness < 0 )) && new_brightness=0
fi
# Set the new brightness.
brightnessctl -d "$device" set "$new_brightness" >/dev/null
# Use SwayOSD to display the new brightness setting.
percent=$((new_brightness * 100 / max_brightness))
nomarchy-swayosd-kbd-brightness "$percent"

View File

@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build the Nomarchy Installer ISO declaratively using the flake.
echo "Building Nomarchy Installer ISO..."
# The output will be a symlink named 'result' in the current directory
nix build .#nixosConfigurations.installerIso.config.system.build.isoImage
if [ $? -eq 0 ]; then
ISO_PATH=$(readlink -f result/iso/*.iso)
echo "Success! ISO built at: $ISO_PATH"
echo "You can now burn this to a USB drive using 'dd' or 'etcher'."
else
echo "Error: ISO build failed."
exit 1
fi

View File

@@ -1,66 +0,0 @@
#!/bin/bash
# Switch between audio outputs while preserving the mute status. By default mapped to Super + Mute.
focused_monitor="$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')"
sinks=$(pactl -f json list sinks | jq '[.[] | select((.ports | length == 0) or ([.ports[]? | .availability != "not available"] | any))]')
sinks_count=$(echo "$sinks" | jq '. | length')
if (( sinks_count == 0 )); then
swayosd-client \
--monitor "$focused_monitor" \
--custom-message "No audio devices found"
exit 1
fi
current_sink_name=$(pactl get-default-sink)
current_sink_index=$(echo "$sinks" | jq -r --arg name "$current_sink_name" 'map(.name) | index($name)')
if [[ $current_sink_index != "null" ]]; then
next_sink_index=$(((current_sink_index + 1) % sinks_count))
else
next_sink_index=0
fi
next_sink=$(echo "$sinks" | jq -r ".[$next_sink_index]")
next_sink_name=$(echo "$next_sink" | jq -r '.name')
next_sink_description=$(echo "$next_sink" | jq -r '.description')
if [[ $next_sink_description == "(null)" ]] || [[ $next_sink_description == "null" ]] || [[ -z $next_sink_description ]]; then
# For Bluetooth devices, the friendly name is on the Device entry (device.id), not the Sink entry (object.id)
device_id=$(echo "$next_sink" | jq -r '.properties."device.id"')
if [[ $device_id != "null" ]] && [[ -n $device_id ]]; then
next_sink_description=$(wpctl status | grep -E "^\s*│?\s+${device_id}\." | sed -E 's/^.*[0-9]+\.\s+//' | sed -E 's/\s+\[.*$//')
fi
# Fall back to object.id lookup if device.id didn't yield a result
if [[ -z $next_sink_description ]]; then
sink_id=$(echo "$next_sink" | jq -r '.properties."object.id"')
next_sink_description=$(wpctl status | grep -E "\s+\*?\s+${sink_id}\." | sed -E 's/^.*[0-9]+\.\s+//' | sed -E 's/\s+\[.*$//')
fi
fi
next_sink_volume=$(echo "$next_sink" | jq -r \
'.volume | to_entries[0].value.value_percent | sub("%"; "")')
next_sink_is_muted=$(echo "$next_sink" | jq -r '.mute')
if [[ $next_sink_is_muted = "true" ]] || (( next_sink_volume == 0 )); then
icon_state="muted"
elif (( next_sink_volume <= 33 )); then
icon_state="low"
elif (( next_sink_volume <= 66 )); then
icon_state="medium"
else
icon_state="high"
fi
next_sink_volume_icon="sink-volume-${icon_state}-symbolic"
if [[ $next_sink_name != $current_sink_name ]]; then
pactl set-default-sink "$next_sink_name"
fi
swayosd-client \
--monitor "$focused_monitor" \
--custom-message "$next_sink_description" \
--custom-icon "$next_sink_volume_icon"

View File

@@ -1,11 +0,0 @@
#!/bin/bash
# Returns true if any of the commands passed in as arguments are missing on the system.
for cmd in "$@"; do
if ! command -v "$cmd" &>/dev/null; then
exit 0
fi
done
exit 1

View File

@@ -1,9 +0,0 @@
#!/bin/bash
# Returns true if all the commands passed in as arguments exit on the system.
for cmd in "$@"; do
command -v "$cmd" &>/dev/null || exit 1
done
exit 0

View File

@@ -1,184 +0,0 @@
#!/bin/bash
# Start and stop a screenrecording, which will be saved to ~/Videos by default.
# Alternative location can be set via OMARCHY_SCREENRECORD_DIR or XDG_VIDEOS_DIR ENVs.
# Resolution is capped to 4K for monitors above 4K, native otherwise.
# Override via --resolution= (e.g. --resolution=1920x1080, --resolution=0x0 for native).
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
OUTPUT_DIR="${OMARCHY_SCREENRECORD_DIR:-${XDG_VIDEOS_DIR:-$HOME/Videos}}"
if [[ ! -d $OUTPUT_DIR ]]; then
notify-send "Screen recording directory does not exist: $OUTPUT_DIR" -u critical -t 3000
exit 1
fi
DESKTOP_AUDIO="false"
MICROPHONE_AUDIO="false"
WEBCAM="false"
WEBCAM_DEVICE=""
RESOLUTION=""
STOP_RECORDING="false"
RECORDING_FILE="/tmp/nomarchy-screenrecord-filename"
for arg in "$@"; do
case "$arg" in
--with-desktop-audio) DESKTOP_AUDIO="true" ;;
--with-microphone-audio) MICROPHONE_AUDIO="true" ;;
--with-webcam) WEBCAM="true" ;;
--webcam-device=*) WEBCAM_DEVICE="${arg#*=}" ;;
--resolution=*) RESOLUTION="${arg#*=}" ;;
--stop-recording) STOP_RECORDING="true" ;;
esac
done
start_webcam_overlay() {
cleanup_webcam
# Auto-detect first available webcam if none specified
if [[ -z $WEBCAM_DEVICE ]]; then
WEBCAM_DEVICE=$(v4l2-ctl --list-devices 2>/dev/null | grep -m1 "^[[:space:]]*/dev/video" | tr -d '\t')
if [[ -z $WEBCAM_DEVICE ]]; then
notify-send "No webcam devices found" -u critical -t 3000
return 1
fi
fi
# Get monitor scale
local scale=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .scale')
# Target width (base 360px, scaled to monitor)
local target_width=$(awk "BEGIN {printf \"%.0f\", 360 * $scale}")
# Try preferred 16:9 resolutions in order, use first available
local preferred_resolutions=("640x360" "1280x720" "1920x1080")
local video_size_arg=""
local available_formats=$(v4l2-ctl --list-formats-ext -d "$WEBCAM_DEVICE" 2>/dev/null)
for resolution in "${preferred_resolutions[@]}"; do
if echo "$available_formats" | grep -q "$resolution"; then
video_size_arg="-video_size $resolution"
break
fi
done
ffplay -f v4l2 $video_size_arg -framerate 30 "$WEBCAM_DEVICE" \
-vf "crop=iw/2:ih,scale=${target_width}:-1" \
-window_title "WebcamOverlay" \
-noborder \
-fflags nobuffer -flags low_delay \
-probesize 32 -analyzeduration 0 \
-loglevel quiet &
sleep 1
}
cleanup_webcam() {
pkill -f "WebcamOverlay" 2>/dev/null
}
default_resolution() {
local width height
read -r width height < <(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | "\(.width) \(.height)"')
if ((width > 3840 || height > 2160)); then
echo "3840x2160"
else
echo "0x0"
fi
}
start_screenrecording() {
local filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"
local audio_devices=""
local audio_args=()
[[ $DESKTOP_AUDIO == "true" ]] && audio_devices+="default_output"
if [[ $MICROPHONE_AUDIO == "true" ]]; then
# Merge audio tracks into one - separate tracks only play one at a time in most players
[[ -n $audio_devices ]] && audio_devices+="|"
audio_devices+="default_input"
fi
[[ -n $audio_devices ]] && audio_args+=(-a "$audio_devices" -ac aac)
local resolution="${RESOLUTION:-$(default_resolution)}"
gpu-screen-recorder -w portal -k auto -s "$resolution" -f 60 -fm cfr -fallback-cpu-encoding yes -o "$filename" "${audio_args[@]}" &
local pid=$!
# Wait for recording to actually start (file appears after portal selection)
while kill -0 $pid 2>/dev/null && [[ ! -f $filename ]]; do
sleep 0.2
done
if kill -0 $pid 2>/dev/null; then
echo "$filename" >"$RECORDING_FILE"
toggle_screenrecording_indicator
fi
}
stop_screenrecording() {
pkill -SIGINT -f "^gpu-screen-recorder" # SIGINT required to save video properly
# Wait a maximum of 5 seconds to finish before hard killing
local count=0
while pgrep -f "^gpu-screen-recorder" >/dev/null && ((count < 50)); do
sleep 0.1
count=$((count + 1))
done
toggle_screenrecording_indicator
cleanup_webcam
if pgrep -f "^gpu-screen-recorder" >/dev/null; then
pkill -9 -f "^gpu-screen-recorder"
notify-send "Screen recording error" "Recording process had to be force-killed. Video may be corrupted." -u critical -t 5000
else
trim_first_frame
local filename=$(cat "$RECORDING_FILE" 2>/dev/null)
local preview="${filename%.mp4}-preview.png"
# Generate a preview thumbnail from the first frame
ffmpeg -y -i "$filename" -ss 00:00:00.1 -vframes 1 -q:v 2 "$preview" -loglevel quiet 2>/dev/null
(
ACTION=$(notify-send "Screen recording saved" "Open with Super + Alt + , (or click this)" -t 10000 -i "${preview:-$filename}" -A "default=open")
[[ $ACTION == "default" ]] && mpv "$filename"
rm -f "$preview"
) &
fi
rm -f "$RECORDING_FILE"
}
toggle_screenrecording_indicator() {
pkill -RTMIN+8 waybar
}
screenrecording_active() {
pgrep -f "^gpu-screen-recorder" >/dev/null
}
trim_first_frame() {
local latest
latest=$(cat "$RECORDING_FILE" 2>/dev/null)
if [[ -n $latest && -f $latest ]]; then
local trimmed="${latest%.mp4}-trimmed.mp4"
if ffmpeg -y -ss 0.1 -i "$latest" -c copy "$trimmed" -loglevel quiet 2>/dev/null; then
mv "$trimmed" "$latest"
else
rm -f "$trimmed"
fi
fi
}
if screenrecording_active; then
stop_screenrecording
elif [[ $STOP_RECORDING == "true" ]]; then
exit 1
else
[[ $WEBCAM == "true" ]] && start_webcam_overlay
start_screenrecording || cleanup_webcam
fi

View File

@@ -1,36 +0,0 @@
#!/bin/bash
# Run the Nomarchy screensaver using random effects from TTE.
screensaver_in_focus() {
hyprctl activewindow -j | jq -e '.class == "org.nomarchy.screensaver"' >/dev/null 2>&1
}
exit_screensaver() {
hyprctl keyword cursor:invisible false &>/dev/null || true
pkill -x tte 2>/dev/null
pkill -f org.nomarchy.screensaver 2>/dev/null
exit 0
}
# Exit the screensaver on signals and input from keyboard and mouse
trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT
printf '\033]11;rgb:00/00/00\007' # Set background color to black
hyprctl keyword cursor:invisible true &>/dev/null
tty=$(tty 2>/dev/null)
while true; do
tte -i ~/.config/nomarchy/branding/screensaver.txt \
--frame-rate 120 --canvas-width 0 --canvas-height 0 --reuse-canvas --anchor-canvas c --anchor-text c\
--random-effect --exclude-effects dev_worm \
--no-eol --no-restore-cursor &
while pgrep -t "${tty#/dev/}" -x tte >/dev/null; do
if read -n1 -t 1 || ! screensaver_in_focus; then
exit_screensaver
fi
done
done

View File

@@ -1,133 +0,0 @@
#!/bin/bash
# Take a screenshot of the whole screen, a specific window, or a user-drawn region.
# Saves to ~/Pictures by default, but that can be changed via OMARCHY_SCREENSHOT_DIR or XDG_PICTURES_DIR ENVs.
# Editor defaults to Satty but can be changed via --editor=<name> or OMARCHY_SCREENSHOT_EDITOR env
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}"
if [[ ! -d $OUTPUT_DIR ]]; then
notify-send "Screenshot directory does not exist: $OUTPUT_DIR" -u critical -t 3000
exit 1
fi
pkill slurp && exit 0
SCREENSHOT_EDITOR="${OMARCHY_SCREENSHOT_EDITOR:-satty}"
# Parse --editor flag from any position
ARGS=()
for arg in "$@"; do
if [[ $arg == --editor=* ]]; then
SCREENSHOT_EDITOR="${arg#--editor=}"
else
ARGS+=("$arg")
fi
done
set -- "${ARGS[@]}"
open_editor() {
local filepath="$1"
if [[ $SCREENSHOT_EDITOR == "satty" ]]; then
satty --filename "$filepath" \
--output-filename "$filepath" \
--actions-on-enter save-to-clipboard \
--save-after-copy \
--copy-command 'wl-copy'
else
$SCREENSHOT_EDITOR "$filepath"
fi
}
MODE="${1:-smart}"
PROCESSING="${2:-slurp}"
# accounting for portrait/transformed displays
JQ_MONITOR_GEO='
def format_geo:
.x as $x | .y as $y |
(.width / .scale | floor) as $w |
(.height / .scale | floor) as $h |
.transform as $t |
if $t == 1 or $t == 3 then
"\($x),\($y) \($h)x\($w)"
else
"\($x),\($y) \($w)x\($h)"
end;
'
get_rectangles() {
local active_workspace=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .activeWorkspace.id')
hyprctl monitors -j | jq -r --arg ws "$active_workspace" "${JQ_MONITOR_GEO} .[] | select(.activeWorkspace.id == (\$ws | tonumber)) | format_geo"
hyprctl clients -j | jq -r --arg ws "$active_workspace" '.[] | select(.workspace.id == ($ws | tonumber)) | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"'
}
# Select based on mode
case "$MODE" in
region)
hyprpicker -r -z >/dev/null 2>&1 &
PID=$!
sleep .1
SELECTION=$(slurp 2>/dev/null)
kill $PID 2>/dev/null
;;
windows)
hyprpicker -r -z >/dev/null 2>&1 &
PID=$!
sleep .1
SELECTION=$(get_rectangles | slurp -r 2>/dev/null)
kill $PID 2>/dev/null
;;
fullscreen)
SELECTION=$(hyprctl monitors -j | jq -r "${JQ_MONITOR_GEO} .[] | select(.focused == true) | format_geo")
;;
smart | *)
RECTS=$(get_rectangles)
hyprpicker -r -z >/dev/null 2>&1 &
PID=$!
sleep .1
SELECTION=$(echo "$RECTS" | slurp 2>/dev/null)
kill $PID 2>/dev/null
# If the selection area is L * W < 20, we'll assume you were trying to select whichever
# window or output it was inside of to prevent accidental 2px snapshots
if [[ $SELECTION =~ ^([0-9]+),([0-9]+)[[:space:]]([0-9]+)x([0-9]+)$ ]]; then
if ((${BASH_REMATCH[3]} * ${BASH_REMATCH[4]} < 20)); then
click_x="${BASH_REMATCH[1]}"
click_y="${BASH_REMATCH[2]}"
while IFS= read -r rect; do
if [[ $rect =~ ^([0-9]+),([0-9]+)[[:space:]]([0-9]+)x([0-9]+) ]]; then
rect_x="${BASH_REMATCH[1]}"
rect_y="${BASH_REMATCH[2]}"
rect_width="${BASH_REMATCH[3]}"
rect_height="${BASH_REMATCH[4]}"
if ((click_x >= rect_x && click_x < rect_x + rect_width && click_y >= rect_y && click_y < rect_y + rect_height)); then
SELECTION="${rect_x},${rect_y} ${rect_width}x${rect_height}"
break
fi
fi
done <<<"$RECTS"
fi
fi
;;
esac
[[ -z $SELECTION ]] && exit 0
FILENAME="screenshot-$(date +'%Y-%m-%d_%H-%M-%S').png"
FILEPATH="$OUTPUT_DIR/$FILENAME"
if [[ $PROCESSING == "slurp" ]]; then
grim -g "$SELECTION" "$FILEPATH" || exit 1
wl-copy <"$FILEPATH"
(
ACTION=$(notify-send "Screenshot saved to clipboard and file" "Edit with Super + Alt + , (or click this)" -t 10000 -i "$FILEPATH" -A "default=edit")
[[ $ACTION == "default" ]] && open_editor "$FILEPATH"
) &
else
grim -g "$SELECTION" - | wl-copy
fi

View File

@@ -1,46 +0,0 @@
#!/bin/bash
# Share clipboard, file, or folder using LocalSend. Bound to Super + Ctrl + S by default.
if (($# == 0)); then
echo "Usage: nomarchy-cmd-share [clipboard|file|folder]"
exit 1
fi
MODE="$1"
shift
if [[ $MODE == "clipboard" ]]; then
TEMP_FILE=$(mktemp --suffix=.txt)
wl-paste >"$TEMP_FILE"
FILES="$TEMP_FILE"
else
if (($# > 0)); then
FILES="$*"
else
if [[ $MODE == "folder" ]]; then
# Pick a single folder from home directory
FILES=$(find "$HOME" -type d 2>/dev/null | fzf)
else
# Pick one or more files from home directory
FILES=$(find "$HOME" -type f 2>/dev/null | fzf --multi)
fi
[[ -z $FILES ]] && exit 0
fi
fi
# Run LocalSend in its own systemd service (detached from terminal)
# Convert newline-separated files to space-separated arguments
if [[ $MODE != "clipboard" ]] && echo "$FILES" | grep -q $'\n'; then
# Multiple files selected - convert newlines to array
readarray -t FILE_ARRAY <<<"$FILES"
systemd-run --user --quiet --collect localsend --headless send "${FILE_ARRAY[@]}"
else
# Single file or clipboard mode
systemd-run --user --quiet --collect localsend --headless send "$FILES"
fi
# Note: Temporary file will remain until system cleanup for clipboard mode
# This ensures the file content is available for the LocalSend GUI
exit 0

View File

@@ -1,22 +0,0 @@
#!/bin/bash
# Returns the current working directory of the active terminal window,
# so a new terminal window can be started in the same directory.
# Go from current active terminal to its child shell process and run cwd there
terminal_pid=$(hyprctl activewindow | awk '/pid:/ {print $2}')
shell_pid=$(pgrep -P "$terminal_pid" | tail -n1)
if [[ -n $shell_pid ]]; then
cwd=$(readlink -f "/proc/$shell_pid/cwd" 2>/dev/null)
shell=$(readlink -f "/proc/$shell_pid/exe" 2>/dev/null)
# Check if $shell is a valid shell and $cwd is a directory.
if grep -qs "$shell" /etc/shells && [[ -d $cwd ]]; then
echo "$cwd"
else
echo "$HOME"
fi
else
echo "$HOME"
fi

View File

@@ -1,45 +0,0 @@
#!/bin/bash
# Add an EFI boot entry for the Nomarchy UKI, allowing the system to boot directly
# without a bootloader like Limine. Requires UEFI firmware and a built UKI.
if [[ ! -d /sys/firmware/efi ]]; then
echo "Error: System is not booted in UEFI mode" >&2
exit 1
fi
if ! efibootmgr &>/dev/null; then
echo "Error: efibootmgr is not available or not functional" >&2
exit 1
fi
if cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "American Megatrends"; then
echo "Error: American Megatrends firmware may not safely support custom EFI entries" >&2
exit 1
fi
if cat /sys/class/dmi/id/bios_vendor 2>/dev/null | grep -qi "Apple"; then
echo "Error: Apple firmware uses its own boot manager" >&2
exit 1
fi
uki_file=$(find /boot/EFI/Linux/ -name "nomarchy*.efi" -printf "%f\n" 2>/dev/null | head -1)
if [[ -z $uki_file ]]; then
echo "Error: No Nomarchy UKI found in /boot/EFI/Linux/" >&2
exit 1
fi
boot_source=$(findmnt -n -o SOURCE /boot)
disk=$(echo "$boot_source" | sed 's/p\?[0-9]*$//')
part=$(echo "$boot_source" | grep -o 'p\?[0-9]*$' | sed 's/^p//')
if gum confirm "Setup direct boot (so snapshot booting must be done via bios)?"; then
echo "Creating EFI boot entry for $uki_file"
sudo efibootmgr --create \
--disk "$disk" \
--part "$part" \
--label "Nomarchy" \
--loader "\\EFI\\Linux\\$uki_file"
fi

View File

@@ -1,49 +0,0 @@
#!/bin/bash
# Returns drive information about a given volumne, like /dev/nvme0, which is used by nomarchy-drive-select.
if (($# == 0)); then
echo "Usage: nomarchy-drive-info [/dev/drive]"
exit 1
else
drive="$1"
fi
# Find the root drive in case we are looking at partitions
root_drive=$(lsblk -no PKNAME "$drive" 2>/dev/null | tail -n1)
if [[ -n $root_drive ]]; then
root_drive="/dev/$root_drive"
else
root_drive="$drive"
fi
# Get basic disk information
size=$(lsblk -dno SIZE "$drive" 2>/dev/null)
vendor=$(lsblk -dno VENDOR "$root_drive" 2>/dev/null | sed 's/ *$//')
model=$(lsblk -dno MODEL "$root_drive" 2>/dev/null | sed 's/ *$//')
# Combine vendor and model, avoiding duplication
label=""
if [[ -n $vendor && -n $model ]]; then
if [[ $model == *$vendor* ]]; then
label="$model"
else
label="$vendor $model"
fi
elif [[ -n $model ]]; then
label="$model"
elif [[ -n $vendor ]]; then
label="$vendor"
fi
# Format display string
display="$drive"
[[ -n $size ]] && display="$display ($size)"
[[ -n $label ]] && display="$display - $label"
# Append compact partition summary
part_summary=$(lsblk -nro TYPE,NAME,FSTYPE,MOUNTPOINT "$root_drive" 2>/dev/null | \
awk '$1=="part" { printf "%s%s%s", s, ($3==""?"unknown":$3), ($4==""?"":"("$4")"); s=", " }')
[[ -n $part_summary ]] && display+=" [$part_summary]"
echo "$display"

View File

@@ -1,18 +0,0 @@
#!/bin/bash
# Select a drive from a list with info that includes space and brand. Used by nomarchy-drive-set-password.
if (($# == 0)); then
drives=$(lsblk -dpno NAME | grep -E '/dev/(sd|hd|vd|nvme|mmcblk|xv)')
else
drives="$@"
fi
drives_with_info=""
while IFS= read -r drive; do
[[ -n $drive ]] || continue
drives_with_info+="$(nomarchy-drive-info "$drive")"$'\n'
done <<<"$drives"
selected_drive="$(printf "%s" "$drives_with_info" | gum choose --header "Select drive")" || exit 1
printf "%s\n" "$selected_drive" | awk '{print $1}'

View File

@@ -1,23 +0,0 @@
#!/bin/bash
# Set a new encryption password for a drive selected.
encrypted_drives=$(blkid -t TYPE=crypto_LUKS -o device)
if [[ -n $encrypted_drives ]]; then
if (( $(wc -l <<<encrypted_drives) == 1 )); then
drive_to_change="$encrypted_drives"
else
drive_to_change="$(nomarchy-drive-select "$encrypted_drives")"
fi
if [[ -n $drive_to_change ]]; then
echo "Changing full-disk encryption password for $drive_to_change"
sudo cryptsetup luksChangeKey --pbkdf argon2id --iter-time 2000 "$drive_to_change"
else
echo "No drive selected."
fi
else
echo "No encrypted drives available."
exit 1
fi

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# Returns the name of the current monospace font being used by extracting it from the Waybar stylesheet.
# This can be changed using nomarchy-font-set.
grep -oP 'font-family:\s*["'\'']?\K[^;"'\'']+' ~/.config/waybar/style.css | head -n1

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Returns a list of all the monospace fonts available on the system that can be set using nomarchy-font-set.
fc-list :spacing=100 -f "%{family[0]}\n" | grep -v -i -E 'emoji|signwriting|nomarchy' | sort -u

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
# Set the system-wide monospace font that should be used by the terminal, hyprlock, waybar, swayosd, etc.
# Declarative version for Nomarchy NixOS.
font_name="$1"
if [[ -z $font_name ]]; then
echo "Usage: nomarchy-font-set <font-name>"
exit 1
fi
STATE_DIR="$HOME/.config/home-manager"
STATE_FILE="$STATE_DIR/state.json"
mkdir -p "$STATE_DIR"
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
if fc-list | grep -iq "$font_name"; then
TMP_JSON=$(mktemp)
jq ".font = \"$font_name\"" "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
echo "Font set to $font_name declaratively. Applying changes..."
env-update
# Instant feedback for certain apps via IPC
if pgrep -x kitty; then
pkill -USR1 kitty
fi
if pgrep -x ghostty; then
pkill -SIGUSR2 ghostty
notify-send -u low " You must restart Ghostty to see font change"
fi
nomarchy-hook font-set "$font_name"
else
echo "Font '$font_name' not found."
exit 1
fi

View File

@@ -1,95 +0,0 @@
#!/usr/bin/env python3
"""Haptic feedback daemon for Synaptics touchpads with Manual Trigger.
Monitors touchpad button press events and sends haptic pulses via HID
feature reports. Required because the kernel's HID haptic subsystem only
supports Auto Trigger with waveform enumeration, not the simpler Manual
Trigger protocol used by these Synaptics touchpads.
"""
import fcntl, glob, os, struct, sys
VENDOR = "06CB"
PRODUCT = "D01A"
REPORT_ID = 0x37
INTENSITY = 40 # 0-100
# input_event: struct timeval (16 bytes on 64-bit) + type(H) + code(H) + value(i)
EVENT_FORMAT = "llHHi"
EVENT_SIZE = struct.calcsize(EVENT_FORMAT)
EV_KEY = 0x01
BTN_LEFT = 272
BTN_RIGHT = 273
BTN_MIDDLE = 274
# ioctl: HIDIOCSFEATURE(len) = _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
def HIDIOCSFEATURE(length):
return 0xC0000000 | (length << 16) | (ord("H") << 8) | 0x06
def find_hidraw():
for path in sorted(glob.glob("/sys/class/hidraw/hidraw*")):
uevent = os.path.join(path, "device", "uevent")
try:
with open(uevent) as f:
content = f.read().upper()
if f"0000{VENDOR}" in content and f"0000{PRODUCT}" in content:
return os.path.join("/dev", os.path.basename(path))
except OSError:
continue
return None
def find_touchpad_event():
for path in sorted(glob.glob("/sys/class/input/event*/device/name")):
try:
with open(path) as f:
name = f.read().strip().upper()
if VENDOR in name and PRODUCT in name and "TOUCHPAD" in name:
event = path.split("/")[-3]
return os.path.join("/dev/input", event)
except OSError:
continue
return None
def main():
hidraw = find_hidraw()
if not hidraw:
print("No Synaptics haptic touchpad hidraw device found", file=sys.stderr)
sys.exit(1)
event = find_touchpad_event()
if not event:
print("No Synaptics haptic touchpad input device found", file=sys.stderr)
sys.exit(1)
print(f"Haptic touchpad: hidraw={hidraw} input={event} intensity={INTENSITY}", flush=True)
haptic_report = struct.pack("BB", REPORT_ID, INTENSITY)
ioctl_req = HIDIOCSFEATURE(len(haptic_report))
hidraw_fd = os.open(hidraw, os.O_RDWR)
event_fd = os.open(event, os.O_RDONLY)
try:
while True:
data = os.read(event_fd, EVENT_SIZE)
if len(data) < EVENT_SIZE:
continue
_, _, ev_type, code, value = struct.unpack(EVENT_FORMAT, data)
if ev_type == EV_KEY and code in (BTN_LEFT, BTN_RIGHT, BTN_MIDDLE) and value == 1:
try:
fcntl.ioctl(hidraw_fd, ioctl_req, haptic_report)
except OSError:
pass
except KeyboardInterrupt:
pass
finally:
os.close(event_fd)
os.close(hidraw_fd)
if __name__ == "__main__":
main()

View File

@@ -1,18 +0,0 @@
#!/bin/bash
# Check if hibernation is supported
if [[ ! -f /sys/power/image_size ]]; then
exit 1
fi
# Sum all swap sizes (excluding zram)
SWAPSIZE_KB=$(awk '!/Filename|zram/ {sum += $3} END {print sum+0}' /proc/swaps)
SWAPSIZE=$(( 1024 * ${SWAPSIZE_KB:-0} ))
HIBERNATION_IMAGE_SIZE=$(cat /sys/power/image_size)
if (( SWAPSIZE > HIBERNATION_IMAGE_SIZE )) && [[ -f /etc/mkinitcpio.conf.d/nomarchy_resume.conf ]]; then
exit 0
else
exit 1
fi

View File

@@ -1,59 +0,0 @@
#!/bin/bash
# Removes hibernation setup: disables swap, removes swapfile, removes fstab entry,
# removes resume hook, and removes suspend-then-hibernate configuration.
MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/nomarchy_resume.conf"
# Check if hibernation is configured
if [[ ! -f $MKINITCPIO_CONF ]] || ! grep -q "^HOOKS+=(resume)$" "$MKINITCPIO_CONF"; then
echo "Hibernation is not set up"
exit 0
fi
if ! gum confirm "Remove hibernation setup?"; then
exit 0
fi
SWAP_SUBVOLUME="/swap"
SWAP_FILE="$SWAP_SUBVOLUME/swapfile"
# Disable swap if active
if swapon --show | grep -q "$SWAP_FILE"; then
echo "Disabling swap on $SWAP_FILE"
sudo swapoff "$SWAP_FILE"
fi
# Remove swapfile
if [[ -f $SWAP_FILE ]]; then
echo "Removing swapfile"
sudo rm "$SWAP_FILE"
fi
# Remove swap subvolume
if sudo btrfs subvolume show "$SWAP_SUBVOLUME" &>/dev/null; then
echo "Removing Btrfs subvolume $SWAP_SUBVOLUME"
sudo btrfs subvolume delete "$SWAP_SUBVOLUME"
fi
# Remove fstab entry
if grep -Fq "$SWAP_FILE" /etc/fstab; then
echo "Removing swapfile from /etc/fstab"
sudo cp -a /etc/fstab "/etc/fstab.$(date +%Y%m%d%H%M%S).back"
sudo sed -i "\|$SWAP_FILE|d" /etc/fstab
sudo sed -i '/^# Btrfs swapfile for system hibernation$/d' /etc/fstab
fi
# Remove suspend-then-hibernate configuration
echo "Removing suspend-then-hibernate configuration"
sudo rm -f /etc/systemd/logind.conf.d/lid.conf
sudo rm -f /etc/systemd/sleep.conf.d/hibernate.conf
# Remove mkinitcpio resume hook
echo "Removing resume hook"
sudo rm "$MKINITCPIO_CONF"
echo "Regenerating initramfs..."
sudo limine-mkinitcpio
echo "Hibernation removed"

View File

@@ -1,102 +0,0 @@
#!/bin/bash
# Creates a swap file in the btrfs subvolume, adds the swap file to /etc/fstab,
# adds a resume hook to mkinitcpio, and configures suspend-then-hibernate.
if [[ ! -f /sys/power/image_size ]]; then
echo -e "Hibernation is not supported on your system" >&2
exit 0
fi
if ! command -v limine-mkinitcpio &>/dev/null; then
echo "Skipping hibernation setup (requires Limine bootloader)"
exit 0
fi
MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/nomarchy_resume.conf"
# Check if hibernation is already configured
if [[ -f $MKINITCPIO_CONF ]] && grep -q "^HOOKS+=(resume)$" "$MKINITCPIO_CONF"; then
echo "Hibernation is already set up"
exit 0
fi
if [[ $1 != "--force" ]]; then
MEM_TOTAL_HUMAN=$(free --human | awk '/Mem/ {print $2}')
if ! gum confirm "Use $MEM_TOTAL_HUMAN on boot drive to make hibernation available?"; then
exit 0
fi
fi
SWAP_SUBVOLUME="/swap"
SWAP_FILE="$SWAP_SUBVOLUME/swapfile"
# Create btrfs subvolume for swap
if ! sudo btrfs subvolume show "$SWAP_SUBVOLUME" &>/dev/null; then
echo "Creating Btrfs subvolume"
sudo btrfs subvolume create "$SWAP_SUBVOLUME"
sudo chattr +C "$SWAP_SUBVOLUME"
fi
# Create swapfile
if ! sudo swaplabel "$SWAP_FILE" &>/dev/null; then
echo "Creating swapfile in Btrfs subvolume"
MEM_TOTAL_KB="$(awk '/MemTotal/ {print $2}' /proc/meminfo)k"
sudo btrfs filesystem mkswapfile -s "$MEM_TOTAL_KB" "$SWAP_FILE"
fi
# Add swapfile to fstab
if ! grep -Fq "$SWAP_FILE" /etc/fstab; then
echo "Adding swapfile to /etc/fstab"
sudo cp -a /etc/fstab "/etc/fstab.$(date +%Y%m%d%H%M%S).back"
printf "\n# Btrfs swapfile for system hibernation\n%s none swap defaults,pri=0 0 0\n" "$SWAP_FILE" | sudo tee -a /etc/fstab >/dev/null
fi
# Enable swap
if ! swapon --show | grep -q "$SWAP_FILE"; then
echo "Enabling swap on $SWAP_FILE"
sudo swapon -p 0 "$SWAP_FILE"
fi
# Add resume hook to mkinitcpio
sudo mkdir -p /etc/mkinitcpio.conf.d
echo "Adding resume hook to $MKINITCPIO_CONF"
echo "HOOKS+=(resume)" | sudo tee "$MKINITCPIO_CONF" >/dev/null
# Ensure keyboard backlight doesn't prevent sleep
sudo cp -p "$OMARCHY_PATH/default/systemd/system-sleep/keyboard-backlight" /usr/lib/systemd/system-sleep/
# Add resume= kernel parameters so the initramfs resume hook knows where to find the
# hibernation image. Without these, resume happens late (after GPU drivers load) and fails.
RESUME_DROP_IN="/etc/limine-entry-tool.d/resume.conf"
if [[ ! -f $RESUME_DROP_IN ]]; then
echo "Adding resume kernel parameters"
sudo swapon -p 0 "$SWAP_FILE" 2>/dev/null
RESUME_DEVICE=$(findmnt -no SOURCE -T "$SWAP_FILE" | sed 's/\[.*\]//')
RESUME_OFFSET=$(sudo btrfs inspect-internal map-swapfile -r "$SWAP_FILE")
sudo mkdir -p /etc/limine-entry-tool.d
echo "KERNEL_CMDLINE[default]+=\" resume=$RESUME_DEVICE resume_offset=$RESUME_OFFSET\"" | sudo tee "$RESUME_DROP_IN" >/dev/null
sudo tee -a /etc/default/limine < "$RESUME_DROP_IN" >/dev/null
fi
# Use ACPI alarm for RTC wakeup on s2idle systems (needed for suspend-then-hibernate)
if grep -q "\[s2idle\]" /sys/power/mem_sleep 2>/dev/null; then
LIMINE_DROP_IN="/etc/limine-entry-tool.d/rtc-alarm.conf"
if [[ ! -f $LIMINE_DROP_IN ]]; then
echo "Enabling ACPI RTC alarm for s2idle suspend"
sudo mkdir -p /etc/limine-entry-tool.d
echo 'KERNEL_CMDLINE[default]+=" rtc_cmos.use_acpi_alarm=1"' | sudo tee "$LIMINE_DROP_IN" >/dev/null
sudo tee -a /etc/default/limine < "$LIMINE_DROP_IN" >/dev/null
fi
fi
# Regenerate initramfs and boot entry
echo "Regenerating initramfs..."
sudo limine-mkinitcpio
sudo limine-update
echo
if [[ $1 != "--force" ]] && gum confirm "Reboot to enable hibernation?"; then
nomarchy-system-reboot
fi

View File

@@ -1,18 +0,0 @@
#!/bin/bash
# Run a named hook, like post-update (available in ~/.config/nomarchy/hooks/post-update).
set -e
if (( $# < 1 )); then
echo "Usage: nomarchy-hook [name] [args...]"
exit 1
fi
HOOK=$1
HOOK_PATH="$HOME/.config/nomarchy/hooks/$1"
shift
if [[ -f $HOOK_PATH ]]; then
bash "$HOOK_PATH" "$@"
fi

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# Detect whether the computer is an Asus ROG machine.
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "ASUSTeK COMPUTER INC." ]] &&
grep -q "ROG" /sys/class/dmi/id/product_family 2>/dev/null

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# Detect whether the computer is a Framework Laptop 16.
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Framework" ]] &&
nomarchy-hw-match "Laptop 16"

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Detect whether the computer has an Intel CPU.
[[ $(grep -m1 "vendor_id" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ') == "GenuineIntel" ]]

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Detect whether the computer has an Intel Panther Lake GPU.
lspci | grep -iE 'vga|3d|display' | grep -qi 'panther lake'

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# Match against the computer's DMI product name (case-insensitive).
# Usage: nomarchy-hw-match "XPS"
grep -qi "$1" /sys/class/dmi/id/product_name 2>/dev/null

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# Detect whether the computer is a Microsoft Surface device.
[[ $(cat /sys/class/dmi/id/sys_vendor 2>/dev/null) == "Microsoft Corporation" ]] &&
nomarchy-hw-match "Surface"

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# Detect whether Vulkan is available.
[[ -d /usr/share/vulkan/icd.d ]] &&
find /usr/share/vulkan/icd.d -maxdepth 1 -name "*.json" -print -quit | grep -q .

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Toggles transparency for the currently focused window.
hyprctl dispatch setprop "address:$(hyprctl activewindow -j | jq -r '.address')" opaque toggle

View File

@@ -1,24 +0,0 @@
#!/bin/bash
# Get the active monitor (the one with the cursor)
MONITOR_INFO=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true)')
ACTIVE_MONITOR=$(echo "$MONITOR_INFO" | jq -r '.name')
CURRENT_SCALE=$(echo "$MONITOR_INFO" | jq -r '.scale')
WIDTH=$(echo "$MONITOR_INFO" | jq -r '.width')
HEIGHT=$(echo "$MONITOR_INFO" | jq -r '.height')
REFRESH_RATE=$(echo "$MONITOR_INFO" | jq -r '.refreshRate')
# Cycle through scales: 1 → 1.6 → 2 → 3 → 1
CURRENT_INT=$(awk -v s="$CURRENT_SCALE" 'BEGIN { printf "%.0f", s * 10 }')
case "$CURRENT_INT" in
10) NEW_SCALE=1.6 ;;
16) NEW_SCALE=2 ;;
20) NEW_SCALE=3 ;;
*) NEW_SCALE=1 ;;
esac
hyprctl keyword misc:disable_scale_notification true
hyprctl keyword monitor "$ACTIVE_MONITOR,${WIDTH}x${HEIGHT}@${REFRESH_RATE},auto,$NEW_SCALE"
hyprctl keyword misc:disable_scale_notification false
notify-send -u low "󰍹 Display scaling set to ${NEW_SCALE}x"

View File

@@ -1,9 +0,0 @@
#!/bin/bash
# Close all open windows
hyprctl clients -j | \
jq -r ".[].address" | \
xargs -I{} hyprctl dispatch closewindow address:{}
# Move to first workspace
hyprctl dispatch workspace 1

View File

@@ -1,29 +0,0 @@
#!/usr/bin/env bash
# Toggles the window gaps globally between no gaps and the default 10/5/2, declaratively and instantly.
STATE_FILE="$HOME/.config/home-manager/state.json"
mkdir -p "$(dirname "$STATE_FILE")"
if [ ! -f "$STATE_FILE" ]; then
echo "{}" > "$STATE_FILE"
fi
gaps=$(jq -r '.hyprland.gaps_out // 10' "$STATE_FILE")
if [[ $gaps == "0" ]]; then
NEW_STATE='{"gaps_out": 10, "gaps_in": 5, "border_size": 2}'
hyprctl keyword general:gaps_out 10
hyprctl keyword general:gaps_in 5
hyprctl keyword general:border_size 2
else
NEW_STATE='{"gaps_out": 0, "gaps_in": 0, "border_size": 0}'
hyprctl keyword general:gaps_out 0
hyprctl keyword general:gaps_in 0
hyprctl keyword general:border_size 0
fi
TMP_JSON=$(mktemp)
jq ".hyprland = $NEW_STATE" "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$STATE_FILE"
echo "Toggled gaps to $NEW_STATE declaratively."

View File

@@ -1,46 +0,0 @@
#!/bin/bash
# Toggle to pop-out a tile to stay fixed on a display basis.
# Usage:
# nomarchy-hyprland-window-pop [width height [x y]]
#
# Arguments:
# width Optional. Width of the floating window. Default: 1300
# height Optional. Height of the floating window. Default: 900
# x Optional. X position of the window. Must provide both X and Y to take effect.
# y Optional. Y position of the window. Must provide both X and Y to take effect.
#
# Behavior:
# - If the window is already pinned, it will be unpinned and removed from the pop layer.
# - If the window is not pinned, it will be floated, resized, moved/centered, pinned, brought to top, and popped.
width=${1:-1300}
height=${2:-900}
x=${3:-}
y=${4:-}
active=$(hyprctl activewindow -j)
pinned=$(echo "$active" | jq ".pinned")
addr=$(echo "$active" | jq -r ".address")
if [[ $pinned == "true" ]]; then
hyprctl -q --batch \
"dispatch pin address:$addr;" \
"dispatch togglefloating address:$addr;" \
"dispatch tagwindow -pop address:$addr;"
elif [[ -n $addr ]]; then
hyprctl dispatch togglefloating address:$addr
hyprctl dispatch resizeactive exact $width $height address:$addr
if [[ -n $x && -n $y ]]; then
hyprctl dispatch moveactive $x $y address:$addr
else
hyprctl dispatch centerwindow address:$addr
fi
hyprctl -q --batch \
"dispatch pin address:$addr;" \
"dispatch alterzorder top address:$addr;" \
"dispatch tagwindow +pop address:$addr;"
fi

View File

@@ -1,13 +0,0 @@
#!/bin/bash
# Check current single_window_aspect_ratio setting
CURRENT_VALUE=$(hyprctl getoption "layout:single_window_aspect_ratio" 2>/dev/null | head -1)
# Parse vec2 output: "vec2: [1, 1]" or "vec2: [0, 0]"
if [[ $CURRENT_VALUE == *"[1, 1]"* ]]; then
hyprctl keyword layout:single_window_aspect_ratio "0 0"
notify-send -u low " Disable single-window square aspect ratio"
else
hyprctl keyword layout:single_window_aspect_ratio "1 1"
notify-send -u low " Enable single-window square aspect"
fi

View File

@@ -1,14 +0,0 @@
#!/bin/bash
# Toggle the layout on the current active workspace between dwindle and scrolling
ACTIVE_WORKSPACE=$(hyprctl activeworkspace -j | jq -r '.id')
CURRENT_LAYOUT=$(hyprctl activeworkspace -j | jq -r '.tiledLayout')
case "$CURRENT_LAYOUT" in
dwindle) NEW_LAYOUT=scrolling ;;
*) NEW_LAYOUT=dwindle ;;
esac
hyprctl keyword workspace $ACTIVE_WORKSPACE, layout:$NEW_LAYOUT
notify-send -u low "󱂬 Workspace layout set to $NEW_LAYOUT"

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Launch the fastfetch TUI that gives information about the current system.
exec nomarchy-launch-or-focus-tui "bash -c 'fastfetch; read -n 1 -s'"

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Launch the Nomarchy audio controls TUI (provided by wiremix).
nomarchy-launch-or-focus-tui wiremix

View File

@@ -1,7 +0,0 @@
#!/bin/bash
# Launch the Nomarchy bluetooth controls TUI (provided by bluetui).
# Also attempts to unblock bluetooth service if rfkill had blocked it.
rfkill unblock bluetooth
exec nomarchy-launch-or-focus-tui bluetui

View File

@@ -1,17 +0,0 @@
#!/bin/bash
# Launch the default browser as determined by xdg-settings.
# Automatically converts --private into the correct flag for the given browser.
default_browser=$(xdg-settings get default-web-browser)
browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$default_browser 2>/dev/null | head -1)
if $browser_exec --help | grep -q MOZ_LOG; then
private_flag="--private-window"
elif [[ $browser_exec =~ edge ]]; then
private_flag="--inprivate"
else
private_flag="--incognito"
fi
exec setsid uwsm-app -- "$browser_exec" "${@/--private/$private_flag}"

View File

@@ -1,15 +0,0 @@
#!/bin/bash
# Launch the default editor as determined by $EDITOR (set via ~/.config/uwsm/default) (or nvim if missing).
# Starts suitable editors in a terminal window and otherwise as a regular application.
nomarchy-cmd-present "$EDITOR" || EDITOR=nvim
case "$EDITOR" in
nvim | vim | nano | micro | hx | helix | fresh)
exec nomarchy-launch-tui "$EDITOR" "$@"
;;
*)
exec setsid uwsm-app -- "$EDITOR" "$@"
;;
esac

View File

@@ -1,7 +0,0 @@
#!/bin/bash
# Launch a floating terminal with the Nomarchy logo presentation, then execute the command passed in, and finally end with the nomarchy-show-done presentation.
# Used by actions such as Update System.
cmd="$*"
exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.nomarchy.terminal --title=Nomarchy -e bash -c "nomarchy-show-logo; $cmd; if (( \$? != 130 )); then nomarchy-show-done; fi"

View File

@@ -1,19 +0,0 @@
#!/bin/bash
# Launch or focus on a given command identified by the passed in window-pattern.
# Use by some default bindings, like the one for Spotify, to ensure there is only one instance of the application open.
if (($# == 0)); then
echo "Usage: nomarchy-launch-or-focus [window-pattern] [launch-command]"
exit 1
fi
WINDOW_PATTERN="$1"
LAUNCH_COMMAND="${2:-"uwsm-app -- $WINDOW_PATTERN"}"
WINDOW_ADDRESS=$(hyprctl clients -j | jq -r --arg p "$WINDOW_PATTERN" '.[]|select((.class|test("\\b" + $p + "\\b";"i")) or (.title|test("\\b" + $p + "\\b";"i")))|.address' | head -n1)
if [[ -n $WINDOW_ADDRESS ]]; then
hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS"
else
eval exec setsid $LAUNCH_COMMAND
fi

View File

@@ -1,9 +0,0 @@
#!/bin/bash
# Launch or focus on a given TUI identified by the passed in as the command.
# Use by commands like nomarchy-launch-wifi to ensure there is only one wifi configuration screen open.
APP_ID="org.nomarchy.$(basename "$1")"
LAUNCH_COMMAND="nomarchy-launch-tui $@"
exec nomarchy-launch-or-focus "$APP_ID" "$LAUNCH_COMMAND"

View File

@@ -1,15 +0,0 @@
#!/bin/bash
# Launch or focus on a given web app identified by the window-pattern.
# Use by some default bindings, like the one for WhatsApp, to ensure there is only one instance of the application open.
if (($# == 0)); then
echo "Usage: nomarchy-launch-or-focus-webapp [window-pattern] [url-and-flags...]"
exit 1
fi
WINDOW_PATTERN="$1"
shift
LAUNCH_COMMAND="nomarchy-launch-webapp $@"
exec nomarchy-launch-or-focus "$WINDOW_PATTERN" "$LAUNCH_COMMAND"

View File

@@ -1,56 +0,0 @@
#!/bin/bash
# Launch the Nomarchy screensaver in the default terminal on the system with the correct font configuration.
# Exit early if we don't have the tte show
if ! command -v tte &>/dev/null; then
exit 1
fi
# Exit early if screensave is already running
pgrep -f org.nomarchy.screensaver && exit 0
# Allow screensaver to be turned off but also force started
# Skip if screensaver is disabled in configuration
if [[ $NOMARCHY_TOGGLE_SCREENSAVER == "false" ]] && [[ $1 != "force" ]]; then
exit 0
fi
# Silently quit Walker on overlay
walker -q
focused=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')
terminal=$(xdg-terminal-exec --print-id)
for m in $(hyprctl monitors -j | jq -r '.[] | .name'); do
hyprctl dispatch focusmonitor $m
case $terminal in
*Alacritty*)
hyprctl dispatch exec -- \
alacritty --class=org.nomarchy.screensaver \
--config-file ~/.local/share/nomarchy/default/alacritty/screensaver.toml \
-e nomarchy-cmd-screensaver
;;
*ghostty*)
hyprctl dispatch exec -- \
ghostty --class=org.nomarchy.screensaver \
--config-file=~/.local/share/nomarchy/default/ghostty/screensaver \
--font-size=18 \
-e nomarchy-cmd-screensaver
;;
*kitty*)
hyprctl dispatch exec -- \
kitty --class=org.nomarchy.screensaver \
--override font_size=18 \
--override window_padding_width=0 \
-e nomarchy-cmd-screensaver
;;
*)
notify-send -u low "✋ Screensaver only runs in Alacritty, Ghostty, or Kitty"
;;
esac
done
hyprctl dispatch focusmonitor $focused

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Launch the TUI command passed in as an argument in the default terminal with an org.nomarchy.COMMAND app id for styling.
exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.nomarchy.$(basename $1) -e "$1" "${@:2}"

View File

@@ -1,15 +0,0 @@
#!/bin/bash
# Launch the Walker application launcher while ensuring that it's data provider (called elephant) is running first.
# Ensure elephant is running before launching walker
if ! pgrep -x elephant > /dev/null; then
setsid uwsm-app -- elephant &
fi
# Ensure walker service is running
if ! pgrep -f "walker --gapplication-service" > /dev/null; then
setsid uwsm-app -- walker --gapplication-service &
fi
exec walker --width 644 --maxheight 300 --minheight 300 "$@"

View File

@@ -1,12 +0,0 @@
#!/bin/bash
# Launch the passed in URL as a web app in the default browser (or chromium if the default doesn't support --app).
browser=$(xdg-settings get default-web-browser)
case $browser in
google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi* | helium*) ;;
*) browser="chromium.desktop" ;;
esac
exec setsid uwsm-app -- $(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browser 2>/dev/null | head -1) --app="$1" "${@:2}"

View File

@@ -1,7 +0,0 @@
#!/bin/bash
# Launch the Nomarchy wifi controls (provided by the Impala TUI).
# Attempts to unblock the wifi service first in case it should be been blocked.
rfkill unblock wifi
nomarchy-launch-or-focus-tui impala

View File

@@ -1,17 +0,0 @@
#!/bin/bash
# Locks the system using hyprlock, but not before ensuring 1password has also been locked, and the screensaver stopped.
# Lock the screen
pidof hyprlock || hyprlock &
# Set keyboard layout to default (first layout)
hyprctl switchxkblayout all 0 > /dev/null 2>&1
# Ensure 1password is locked
if pgrep -x "1password" >/dev/null; then
1password --lock &
fi
# Avoid running screensaver when locked
pkill -f org.nomarchy.screensaver

View File

@@ -1,379 +0,0 @@
#!/bin/bash
# Launch the Nomarchy Menu or takes a parameter to jump straight to a submenu.
export PATH="$HOME/.local/share/nomarchy/bin:$PATH"
# Set to true when going directly to a submenu, so we can exit directly
BACK_TO_EXIT=false
back_to() {
local parent_menu="$1"
if [[ $BACK_TO_EXIT == "true" ]]; then
exit 0
elif [[ -n $parent_menu ]]; then
"$parent_menu"
else
show_main_menu
fi
}
toggle_existing_menu() {
if pgrep -f "walker.*--dmenu" >/dev/null; then
walker --close >/dev/null 2>&1
exit 0
fi
}
menu() {
local prompt="$1"
local options="$2"
local extra="$3"
local preselect="$4"
read -r -a args <<<"$extra"
if [[ -n $preselect ]]; then
local index
index=$(echo -e "$options" | grep -nxF "$preselect" | cut -d: -f1)
if [[ -n $index ]]; then
args+=("-c" "$index")
fi
fi
echo -e "$options" | nomarchy-launch-walker --dmenu --width 295 --minheight 1 --maxheight 630 -p "$prompt…" "${args[@]}" 2>/dev/null
}
terminal() {
xdg-terminal-exec --app-id=org.nomarchy.terminal "$@"
}
present_terminal() {
nomarchy-launch-floating-terminal-with-presentation $1
}
open_in_editor() {
notify-send -u low "Editing config file" "$1"
nomarchy-launch-editor "$1"
}
show_learn_menu() {
case $(menu "Learn" " Keybindings\n Nomarchy\n Hyprland\n󰣇 Arch\n Neovim\n󱆃 Bash") in
*Keybindings*) nomarchy-menu-keybindings ;;
*Nomarchy*) nomarchy-launch-webapp "https://learn.omacom.io/2/the-nomarchy-manual" ;;
*Hyprland*) nomarchy-launch-webapp "https://wiki.hypr.land/" ;;
*Arch*) nomarchy-launch-webapp "https://wiki.archlinux.org/title/Main_page" ;;
*Bash*) nomarchy-launch-webapp "https://devhints.io/bash" ;;
*Neovim*) nomarchy-launch-webapp "https://www.lazyvim.org/keymaps" ;;
*) show_main_menu ;;
esac
}
show_trigger_menu() {
case $(menu "Trigger" " Capture\n Share\n󰔎 Toggle\n Hardware") in
*Capture*) show_capture_menu ;;
*Share*) show_share_menu ;;
*Toggle*) show_toggle_menu ;;
*Hardware*) show_hardware_menu ;;
*) show_main_menu ;;
esac
}
show_capture_menu() {
case $(menu "Capture" " Screenshot\n Screenrecord\n󰃉 Color") in
*Screenshot*) nomarchy-cmd-screenshot ;;
*Screenrecord*) show_screenrecord_menu ;;
*Color*) pkill hyprpicker || hyprpicker -a ;;
*) back_to show_trigger_menu ;;
esac
}
get_webcam_list() {
v4l2-ctl --list-devices 2>/dev/null | while IFS= read -r line; do
if [[ $line != $'\t'* && -n $line ]]; then
local name="$line"
IFS= read -r device || break
device=$(echo "$device" | tr -d '\t' | head -1)
[[ -n $device ]] && echo "$device $name"
fi
done
}
show_webcam_select_menu() {
local devices=$(get_webcam_list)
local count=$(echo "$devices" | grep -c . 2>/dev/null || echo 0)
if [[ -z $devices ]] || ((count == 0)); then
notify-send "No webcam devices found" -u critical -t 3000
return 1
fi
if ((count == 1)); then
echo "$devices" | awk '{print $1}'
else
menu "Select Webcam" "$devices" | awk '{print $1}'
fi
}
show_screenrecord_menu() {
nomarchy-cmd-screenrecord --stop-recording && exit 0
case $(menu "Screenrecord" " With no audio\n With desktop audio\n With desktop + microphone audio\n With desktop + microphone audio + webcam") in
*"With no audio") nomarchy-cmd-screenrecord ;;
*"With desktop audio") nomarchy-cmd-screenrecord --with-desktop-audio ;;
*"With desktop + microphone audio") nomarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio ;;
*"With desktop + microphone audio + webcam")
local device=$(show_webcam_select_menu) || {
back_to show_capture_menu
return
}
nomarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio --with-webcam --webcam-device="$device"
;;
*) back_to show_capture_menu ;;
esac
}
show_share_menu() {
case $(menu "Share" " Clipboard\n File \n Folder") in
*Clipboard*) nomarchy-cmd-share clipboard ;;
*File*) terminal bash -c "nomarchy-cmd-share file" ;;
*Folder*) terminal bash -c "nomarchy-cmd-share folder" ;;
*) back_to show_trigger_menu ;;
esac
}
show_toggle_menu() {
case $(menu "Toggle" "󱄄 Screensaver\n󰔎 Nightlight\n󱫖 Idle Lock\n󰍜 Top Bar\n󱂬 Workspace Layout\n Window Gaps\n 1-Window Ratio\n󰍹 Display Scaling") in
*Screensaver*) nomarchy-toggle-screensaver ;;
*Nightlight*) nomarchy-toggle-nightlight ;;
*Idle*) nomarchy-toggle-idle ;;
*Bar*) nomarchy-toggle-waybar ;;
*Layout*) nomarchy-hyprland-workspace-layout-toggle ;;
*Ratio*) nomarchy-hyprland-window-single-square-aspect-toggle ;;
*Gaps*) nomarchy-hyprland-window-gaps-toggle ;;
*Scaling*) nomarchy-hyprland-monitor-scaling-cycle ;;
*) back_to show_trigger_menu ;;
esac
}
show_hardware_menu() {
case $(menu "Toggle" " Hybrid GPU") in
*"Hybrid GPU"*) present_terminal nomarchy-toggle-hybrid-gpu ;;
*) show_trigger_menu ;;
esac
}
show_style_menu() {
case $(menu "Style" "󰸌 Theme\n Font\n Background\n Hyprland\n󱄄 Screensaver\n About") in
*Theme*) show_theme_menu ;;
*Font*) show_font_menu ;;
*Background*) show_background_menu ;;
*Hyprland*) open_in_editor ~/.config/hypr/looknfeel.conf ;;
*Screensaver*) open_in_editor ~/.config/nomarchy/branding/screensaver.txt ;;
*About*) open_in_editor ~/.config/nomarchy/branding/about.txt ;;
*) show_main_menu ;;
esac
}
show_theme_menu() {
nomarchy-launch-walker -m menus:nomarchythemes --width 800 --minheight 400
}
show_background_menu() {
nomarchy-launch-walker -m menus:nomarchyBackgroundSelector --width 800 --minheight 400
}
show_font_menu() {
theme=$(menu "Font" "$(nomarchy-font-list)" "--width 350" "$(nomarchy-font-current)")
if [[ $theme == "CNCLD" || -z $theme ]]; then
back_to show_style_menu
else
nomarchy-font-set "$theme"
fi
}
show_setup_menu() {
local options=" Audio\n Wifi\n󰂯 Bluetooth\n󱐋 Power Profile\n System Sleep\n󰍹 Monitors"
[[ -f ~/.config/hypr/bindings.conf ]] && options="$options\n Keybindings"
options="$options\n Key Remapping"
[[ -f ~/.config/hypr/input.conf ]] && options="$options\n Input"
options="$options\n󰱔 DNS\n Security\n Config"
case $(menu "Setup" "$options") in
*Audio*) nomarchy-launch-audio ;;
*Wifi*) nomarchy-launch-wifi ;;
*Bluetooth*) nomarchy-launch-bluetooth ;;
*Power*) show_setup_power_menu ;;
*System*) show_setup_system_menu ;;
*Monitors*) open_in_editor ~/.config/hypr/monitors.conf ;;
*Keybindings*) open_in_editor ~/.config/hypr/bindings.conf ;;
*Input*) open_in_editor ~/.config/hypr/input.conf ;;
*Key\ Remapping*) nomarchy-setup-makima && open_in_editor "$HOME/.config/makima/AT Translated Set 2 keyboard.toml" && nomarchy-restart-makima ;;
*DNS*) present_terminal nomarchy-setup-dns ;;
*Security*) show_setup_security_menu ;;
*Config*) show_setup_config_menu ;;
*) show_main_menu ;;
esac
}
show_setup_power_menu() {
profile=$(menu "Power Profile" "$(nomarchy-powerprofiles-list)" "" "$(powerprofilesctl get)")
if [[ $profile == "CNCLD" || -z $profile ]]; then
back_to show_setup_menu
else
powerprofilesctl set "$profile"
fi
}
show_setup_security_menu() {
case $(menu "Setup" "󰈷 Fingerprint\n Fido2") in
*Fingerprint*) present_terminal nomarchy-setup-fingerprint ;;
*Fido2*) present_terminal nomarchy-setup-fido2 ;;
*) show_setup_menu ;;
esac
}
show_setup_config_menu() {
case $(menu "Setup" " Defaults\n Hyprland\n Hypridle\n Hyprlock\n Hyprsunset\n Swayosd\n󰌧 Walker\n󰍜 Waybar\n󰞅 XCompose") in
*Defaults*) open_in_editor ~/.config/uwsm/default ;;
*Hyprland*) open_in_editor ~/.config/hypr/hyprland.conf ;;
*Hypridle*) open_in_editor ~/.config/hypr/hypridle.conf && nomarchy-restart-hypridle ;;
*Hyprlock*) open_in_editor ~/.config/hypr/hyprlock.conf ;;
*Hyprsunset*) open_in_editor ~/.config/hypr/hyprsunset.conf && nomarchy-restart-hyprsunset ;;
*Swayosd*) open_in_editor ~/.config/swayosd/config.toml && nomarchy-restart-swayosd ;;
*Walker*) open_in_editor ~/.config/walker/config.toml && nomarchy-restart-walker ;;
*Waybar*) open_in_editor ~/.config/waybar/config.jsonc && nomarchy-restart-waybar ;;
*XCompose*) open_in_editor ~/.XCompose && nomarchy-restart-xcompose ;;
*) show_setup_menu ;;
esac
}
show_setup_system_menu() {
local options=""
if [[ $NOMARCHY_TOGGLE_SUSPEND == "false" ]]; then
options="$options󰒲 Enable Suspend"
else
options="$options󰒲 Disable Suspend"
fi
if nomarchy-hibernation-available; then
options="$options\n󰤁 Disable Hibernate"
else
options="$options\n󰤁 Enable Hibernate"
fi
case $(menu "System" "$options") in
*Suspend*) nomarchy-toggle-suspend ;;
*"Enable Hibernate"*) present_terminal nomarchy-hibernation-setup ;;
*"Disable Hibernate"*) present_terminal nomarchy-hibernation-remove ;;
*) show_setup_menu ;;
esac
}
show_update_menu() {
case $(menu "Update" "  Nomarchy\n󰸌 Extra Themes\n Process\n󰇅 Hardware\n Firmware\n Password\n Timezone\n Time") in
*Nomarchy*) present_terminal nomarchy-update ;;
*Themes*) present_terminal nomarchy-theme-update ;;
*Process*) show_update_process_menu ;;
*Hardware*) show_update_hardware_menu ;;
*Firmware*) present_terminal nomarchy-update-firmware ;;
*Timezone*) present_terminal nomarchy-tz-select ;;
*Time*) present_terminal nomarchy-update-time ;;
*Password*) show_update_password_menu ;;
*) show_main_menu ;;
esac
}
show_update_process_menu() {
case $(menu "Restart" " Hypridle\n Hyprsunset\n Swayosd\n󰌧 Walker\n󰍜 Waybar") in
*Hypridle*) nomarchy-restart-hypridle ;;
*Hyprsunset*) nomarchy-restart-hyprsunset ;;
*Swayosd*) nomarchy-restart-swayosd ;;
*Walker*) nomarchy-restart-walker ;;
*Waybar*) nomarchy-restart-waybar ;;
*) show_update_menu ;;
esac
}
show_update_hardware_menu() {
case $(menu "Restart" " Audio\n󱚾 Wi-Fi\n󰂯 Bluetooth") in
*Audio*) present_terminal nomarchy-restart-pipewire ;;
*Wi-Fi*) present_terminal nomarchy-restart-wifi ;;
*Bluetooth*) present_terminal nomarchy-restart-bluetooth ;;
*) show_update_menu ;;
esac
}
show_update_password_menu() {
case $(menu "Update Password" " Drive Encryption\n User") in
*Drive*) present_terminal nomarchy-drive-set-password ;;
*User*) present_terminal passwd ;;
*) show_update_menu ;;
esac
}
show_about() {
nomarchy-launch-about
}
show_system_menu() {
local options="󱄄 Screensaver\n Lock"
[[ $NOMARCHY_TOGGLE_SUSPEND != "false" ]] && options="$options\n󰒲 Suspend"
nomarchy-hibernation-available && options="$options\n󰤁 Hibernate"
options="$options\n󰍃 Logout\n󰜉 Restart\n󰐥 Shutdown"
case $(menu "System" "$options") in
*Screensaver*) nomarchy-launch-screensaver force ;;
*Lock*) nomarchy-lock-screen ;;
*Suspend*) systemctl suspend ;;
*Hibernate*) systemctl hibernate ;;
*Logout*) nomarchy-system-logout ;;
*Restart*) nomarchy-system-reboot ;;
*Shutdown*) nomarchy-system-shutdown ;;
*) back_to show_main_menu ;;
esac
}
show_main_menu() {
go_to_menu "$(menu "Go" "󰀻 Apps\n󰧑 Learn\n󱓞 Trigger\n Style\n Setup\n Update\n About\n System")"
}
go_to_menu() {
case "${1,,}" in
*apps*) walker -p "Launch…" ;;
*learn*) show_learn_menu ;;
*trigger*) show_trigger_menu ;;
*toggle*) show_toggle_menu ;;
*share*) show_share_menu ;;
*background*) show_background_menu ;;
*capture*) show_capture_menu ;;
*style*) show_style_menu ;;
*theme*) show_theme_menu ;;
*screenrecord*) show_screenrecord_menu ;;
*setup*) show_setup_menu ;;
*power*) show_setup_power_menu ;;
*update*) show_update_menu ;;
*about*) show_about ;;
*system*) show_system_menu ;;
esac
}
# Allow user extensions and overrides
USER_EXTENSIONS="$HOME/.config/nomarchy/extensions/menu.sh"
[[ -f $USER_EXTENSIONS ]] && source "$USER_EXTENSIONS"
toggle_existing_menu
if [[ -n $1 ]]; then
BACK_TO_EXIT=true
go_to_menu "$1"
else
show_main_menu
fi

View File

@@ -1,247 +0,0 @@
#!/bin/bash
# Display Hyprland keybindings defined in your configuration using walker for an interactive search menu.
declare -A KEYCODE_SYM_MAP
build_keymap_cache() {
local keymap
keymap="$(xkbcli compile-keymap)" || {
echo "Failed to compile keymap" >&2
return 1
}
while IFS=, read -r code sym; do
[[ -z $code || -z $sym ]] && continue
KEYCODE_SYM_MAP["$code"]="$sym"
done < <(
awk '
BEGIN { sec = "" }
/xkb_keycodes/ { sec = "codes"; next }
/xkb_symbols/ { sec = "syms"; next }
sec == "codes" {
if (match($0, /<([A-Za-z0-9_]+)>\s*=\s*([0-9]+)\s*;/, m)) code_by_name[m[1]] = m[2]
}
sec == "syms" {
if (match($0, /key\s*<([A-Za-z0-9_]+)>\s*\{\s*\[\s*([^, \]]+)/, m)) sym_by_name[m[1]] = m[2]
}
END {
for (k in code_by_name) {
c = code_by_name[k]
s = sym_by_name[k]
if (c != "" && s != "" && s != "NoSymbol") print c "," s
}
}
' <<<"$keymap"
)
}
lookup_keycode_cached() {
printf '%s\n' "${KEYCODE_SYM_MAP[$1]}"
}
parse_keycodes() {
local start end elapsed
[[ ${DEBUG:-0} == "1" ]] && start=$(date +%s.%N)
while IFS= read -r line; do
if [[ $line =~ code:([0-9]+) ]]; then
code="${BASH_REMATCH[1]}"
symbol=$(lookup_keycode_cached "$code" "$XKB_KEYMAP_CACHE")
echo "${line/code:${code}/$symbol}"
elif [[ $line =~ mouse:([0-9]+) ]]; then
code="${BASH_REMATCH[1]}"
case "$code" in
272) symbol="LEFT MOUSE BUTTON" ;;
273) symbol="RIGHT MOUSE BUTTON" ;;
274) symbol="MIDDLE MOUSE BUTTON" ;;
*) symbol="mouse:${code}" ;;
esac
echo "${line/mouse:${code}/$symbol}"
else
echo "$line"
fi
done
if [[ $DEBUG == "1" ]]; then
end=$(date +%s.%N)
# fall back to awk if bc is missing
if command -v bc >/dev/null 2>&1; then
elapsed=$(echo "$end - $start" | bc)
else
elapsed=$(awk -v s="$start" -v e="$end" 'BEGIN{printf "%.6f", (e - s)}')
fi
echo "[DEBUG] parse_keycodes elapsed: ${elapsed}s" >&2
fi
}
# Fetch dynamic keybindings from Hyprland
#
# Also do some pre-processing:
# - Remove standard Nomarchy bin path prefix
# - Remove uwsm prefix
# - Map numeric modifier key mask to a textual rendition
# - Output comma-separated values that the parser can understand
dynamic_bindings() {
hyprctl -j binds |
jq -r '.[] | {modmask, key, keycode, description, dispatcher, arg} | "\(.modmask),\(.key)@\(.keycode),\(.description),\(.dispatcher),\(.arg)"' |
sed -r \
-e 's/null//' \
-e 's,~/.local/share/nomarchy/bin/,,' \
-e 's,uwsm app -- ,,' \
-e 's,uwsm-app -- ,,' \
-e 's/@0//' \
-e 's/,@/,code:/' \
-e 's/^0,/,/' \
-e 's/^1,/SHIFT,/' \
-e 's/^4,/CTRL,/' \
-e 's/^5,/SHIFT CTRL,/' \
-e 's/^8,/ALT,/' \
-e 's/^9,/SHIFT ALT,/' \
-e 's/^12,/CTRL ALT,/' \
-e 's/^13,/SHIFT CTRL ALT,/' \
-e 's/^64,/SUPER,/' \
-e 's/^65,/SUPER SHIFT,/' \
-e 's/^68,/SUPER CTRL,/' \
-e 's/^69,/SUPER SHIFT CTRL,/' \
-e 's/^72,/SUPER ALT,/' \
-e 's/^73,/SUPER SHIFT ALT,/' \
-e 's/^76,/SUPER CTRL ALT,/' \
-e 's/^77,/SUPER SHIFT CTRL ALT,/'
}
# Hardcoded bindings, like the copy-url extension and such
static_bindings() {
echo "SHIFT ALT,L,Copy URL from Web App,extension,copy-url"
}
# Parse and format keybindings
#
# `awk` does the heavy lifting:
# - Set the field separator to a comma ','.
# - Joins the key combination (e.g., "SUPER + Q").
# - Joins the command that the key executes.
# - Prints everything in a nicely aligned format.
parse_bindings() {
awk -F, '
{
# Combine the modifier and key (first two fields)
key_combo = $1 " + " $2;
# Clean up: strip leading "+" if present, trim spaces
gsub(/^[ \t]*\+?[ \t]*/, "", key_combo);
gsub(/[ \t]+$/, "", key_combo);
# Use description, if set
action = $3;
if (action == "") {
# Reconstruct the command from the remaining fields
for (i = 4; i <= NF; i++) {
action = action $i (i < NF ? "," : "");
}
# Clean up trailing commas, remove leading "exec, ", and trim
sub(/,$/, "", action);
gsub(/(^|,)[[:space:]]*exec[[:space:]]*,?/, "", action);
gsub(/^[ \t]+|[ \t]+$/, "", action);
gsub(/[ \t]+/, " ", key_combo); # Collapse multiple spaces to one
# Escape XML entities
gsub(/&/, "\\&amp;", action);
gsub(/</, "\\&lt;", action);
gsub(/>/, "\\&gt;", action);
gsub(/"/, "\\&quot;", action);
gsub(/'"'"'/, "\\&apos;", action);
}
if (action != "") {
printf "%-35s → %s\n", key_combo, action;
}
}'
}
prioritize_entries() {
awk '
{
line = $0
prio = 50
if (match(line, /Terminal/)) prio = 0
if (match(line, /Tmux/)) prio = 1
if (match(line, /Browser/) && !match(line, /Browser[[:space:]]*\(/) && !match(line, /SUPER SHIFT.*\+.*B.*→.*Browser/)) prio = 2
if (match(line, /File manager/) && !match(line, /File manager \(cwd\)/)) prio = 3
if (match(line, /Launch apps/)) prio = 4
if (match(line, /Nomarchy menu/)) prio = 5
if (match(line, /System menu/)) prio = 6
if (match(line, /Theme menu/)) prio = 7
if (match(line, /Full screen/)) prio = 8
if (match(line, /Full width/)) prio = 9
if (match(line, /Close window/)) prio = 10
if (match(line, /Close all windows/)) prio = 11
if (match(line, /Lock system/)) prio = 12
if (match(line, /Toggle window floating/)) prio = 13
if (match(line, /Toggle window split/)) prio = 14
if (match(line, /Pop window/)) prio = 15
if (match(line, /Universal/)) prio = 16
if (match(line, /Clipboard/)) prio = 17
if (match(line, /Audio controls/)) prio = 18
if (match(line, /Bluetooth controls/)) prio = 19
if (match(line, /Wifi controls/)) prio = 20
if (match(line, /Emoji picker/)) prio = 21
if (match(line, /Color picker/)) prio = 22
if (match(line, /Screenshot/)) prio = 23
if (match(line, /Screenrecording/)) prio = 24
if (match(line, /SUPER SHIFT.*\+.*B.*→.*Browser/)) prio = 25
if (match(line, /File manager \(cwd\)/)) prio = 26
if (match(line, /(Switch|Next|Former|Previous).*workspace/)) prio = 27
if (match(line, /Move window to workspace/)) prio = 28
if (match(line, /Move window silently to workspace/)) prio = 29
if (match(line, /Swap window/)) prio = 30
if (match(line, /Move window focus/)) prio = 31
if (match(line, /Move window$/)) prio = 32
if (match(line, /Resize window/)) prio = 33
if (match(line, /Expand window/)) prio = 34
if (match(line, /Shrink window/)) prio = 35
if (match(line, /scratchpad/)) prio = 36
if (match(line, /notification/)) prio = 37
if (match(line, /Toggle window transparency/)) prio = 38
if (match(line, /Toggle workspace gaps/)) prio = 39
if (match(line, /Toggle nightlight/)) prio = 40
if (match(line, /Toggle locking/)) prio = 41
if (match(line, /group/)) prio = 94
if (match(line, /Scroll active workspace/)) prio = 95
if (match(line, /Cycle to/)) prio = 96
if (match(line, /Reveal active/)) prio = 97
if (match(line, /Apple Display/)) prio = 98
if (match(line, /XF86/)) prio = 99
# print "priority<TAB>line"
printf "%d\t%s\n", prio, line
}' |
sort -k1,1n -k2,2 |
cut -f2-
}
output_keybindings() {
build_keymap_cache
{
dynamic_bindings
static_bindings
} |
sort -u |
parse_keycodes |
parse_bindings |
prioritize_entries
}
if [[ $1 == "--print" || $1 == "-p" ]]; then
output_keybindings
else
monitor_height=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .height')
menu_height=$((monitor_height * 40 / 100))
output_keybindings |
walker --dmenu -p 'Keybindings' --width 800 --height "$menu_height"
fi

View File

@@ -1,15 +0,0 @@
#!/bin/bash
# Dismiss a mako notification on the basis of its summary. Used by the first-run notifications to dismiss them after clicking for action.
if (($# == 0)); then
echo "Usage: nomarchy-notification-dismiss <summary>"
exit 1
fi
# Find the first notification whose 'summary' matches the regex in $1
notification_id=$(makoctl list | grep -F "$1" | head -n1 | sed -E 's/^Notification ([0-9]+):.*/\1/')
if [[ -n $notification_id ]]; then
makoctl dismiss -n $notification_id
fi

View File

@@ -1,24 +0,0 @@
#!/bin/bash
# Install an npx wrapper for a given npm package.
# Usage: nomarchy-npx-install <package> [command-name]
#
# If command-name is omitted, it defaults to the package name.
# Example: nomarchy-npx-install opencode-ai opencode
if [[ -z $1 ]]; then
echo "Usage: nomarchy-npx-install <package> [command-name]"
exit 1
fi
package=$1
command=${2:-$1}
mkdir -p "$HOME/.local/bin"
cat > "$HOME/.local/bin/$command" <<EOF
#!/bin/bash
exec npx --yes $package "\$@"
EOF
chmod +x "$HOME/.local/bin/$command"

View File

@@ -1,75 +0,0 @@
#!/usr/bin/env bash
# Nomarchy on-boot initialization script.
# Automatically detects the hardware, applies necessary runtime tweaks,
# and sets the correct screen resolution/scaling.
# 1. Automatically configure optimal screen resolution and scaling
nomarchy-hyprland-monitor-scaling-cycle >/dev/null 2>&1
# 2. Hardware-specific runtime tweaks
if nomarchy-hw-match "Laptop 16"; then
# Framework 16 specific tweaks
nomarchy-theme-set-keyboard-f16 >/dev/null 2>&1
fi
if nomarchy-hw-asus-rog; then
# Asus ROG specific tweaks
nomarchy-theme-set-keyboard-asus-rog >/dev/null 2>&1
fi
# 3. Declarative hardware configuration check (nixos-hardware)
# This part ensures that if we are on an installed system, the correct
# nixos-hardware module is selected in the configuration.
HW_FILE="/etc/nixos/hardware-selection.nix"
if [ -w "$HW_FILE" ]; then
PRODUCT_NAME=$(cat /sys/class/dmi/id/product_name 2>/dev/null || echo "Unknown")
BOARD_NAME=$(cat /sys/class/dmi/id/board_name 2>/dev/null || echo "Unknown")
CPU_VENDOR=$(lscpu | grep "Vendor ID" | awk '{print $3}')
NEW_HW_MODULES=""
if [[ "$CPU_VENDOR" == "AuthenticAMD" ]]; then
NEW_HW_MODULES="inputs.nixos-hardware.nixosModules.common-cpu-amd"
elif [[ "$CPU_VENDOR" == "GenuineIntel" ]]; then
NEW_HW_MODULES="inputs.nixos-hardware.nixosModules.common-cpu-intel"
fi
# Auto-detect specific known models for nixos-hardware
if echo "$PRODUCT_NAME" | grep -qi "XPS 15 9500"; then
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.dell-xps-15-9500"
elif echo "$PRODUCT_NAME" | grep -qi "XPS 13"; then
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.dell-xps-13-9300" # fallback example
elif echo "$PRODUCT_NAME" | grep -qi "Framework Laptop 16"; then
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.framework-16-7040-amd"
elif echo "$PRODUCT_NAME" | grep -qi "Framework Laptop 13"; then
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.framework-13-7040-amd"
elif echo "$PRODUCT_NAME" | grep -qi "Surface"; then
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.microsoft-surface-pro-8" # fallback example
elif echo "$PRODUCT_NAME" | grep -qi "Zephyrus G14"; then
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.asus-zephyrus-g14"
elif echo "$PRODUCT_NAME" | grep -qi "ThinkPad X1 Carbon"; then
NEW_HW_MODULES="$NEW_HW_MODULES\n inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-carbon-gen9"
fi
# Check if the current HW file differs from our detection
if [ -n "$NEW_HW_MODULES" ] && ! grep -q "common-cpu" "$HW_FILE"; then
# This is a basic detection. We overwrite it if it's completely empty or missing common-cpu.
# It's better to let the user know, or auto-apply. We'll auto-apply for a smooth experience.
cat <<EOF > "$HW_FILE.tmp"
{ inputs, ... }:
{
imports = [
$NEW_HW_MODULES
];
}
EOF
if ! cmp -s "$HW_FILE" "$HW_FILE.tmp"; then
mv "$HW_FILE.tmp" "$HW_FILE"
# We notify the user instead of running sys-update silently, as it requires root and time.
notify-send -u normal "Hardware Auto-Detection" "New hardware profile detected. Please run 'sys-update' when ready."
else
rm "$HW_FILE.tmp"
fi
fi
fi

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env bash
PKG_NAME="$1"
if [ -z "$PKG_NAME" ]; then
echo "Usage: nomarchy-pkg-add <package-name>"
exit 1
fi
STATE_FILE="$HOME/.config/home-manager/user-packages.json"
mkdir -p "$(dirname "$STATE_FILE")"
if [ ! -f "$STATE_FILE" ]; then
echo "[]" > "$STATE_FILE"
fi
if jq -e ". | index(\"$PKG_NAME\")" "$STATE_FILE" >/dev/null; then
echo "Package $PKG_NAME is already in your user-packages.json"
exit 0
fi
# Append package to the JSON array
jq ". + [\"$PKG_NAME\"]" "$STATE_FILE" > "${STATE_FILE}.tmp" && mv "${STATE_FILE}.tmp" "$STATE_FILE"
echo "Package $PKG_NAME added declaratively to $STATE_FILE."
echo "Applying changes with env-update..."
env-update

View File

@@ -1,15 +0,0 @@
#!/usr/bin/env bash
PKG_NAME="$1"
if [ -z "$PKG_NAME" ]; then
echo "Usage: nomarchy-pkg-missing <package-name>"
exit 1
fi
nomarchy-pkg-present "$PKG_NAME"
if [ $? -eq 0 ]; then
exit 1
else
exit 0
fi

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env bash
PKG_NAME="$1"
if [ -z "$PKG_NAME" ]; then
echo "Usage: nomarchy-pkg-present <package-name>"
exit 1
fi
STATE_FILE="$HOME/.config/home-manager/user-packages.json"
if [ ! -f "$STATE_FILE" ]; then
exit 1
fi
if jq -e ". | index(\"$PKG_NAME\")" "$STATE_FILE" >/dev/null; then
exit 0
else
exit 1
fi

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env bash
PKG_NAME="$1"
if [ -z "$PKG_NAME" ]; then
echo "Usage: nomarchy-pkg-remove <package-name>"
exit 1
fi
STATE_FILE="$HOME/.config/home-manager/user-packages.json"
if [ ! -f "$STATE_FILE" ]; then
echo "No packages managed by nomarchy-pkg yet."
exit 0
fi
if ! jq -e ". | index(\"$PKG_NAME\")" "$STATE_FILE" >/dev/null; then
echo "Package $PKG_NAME is not in your user-packages.json"
exit 0
fi
# Remove package from the JSON array
jq ". - [\"$PKG_NAME\"]" "$STATE_FILE" > "${STATE_FILE}.tmp" && mv "${STATE_FILE}.tmp" "$STATE_FILE"
echo "Package $PKG_NAME removed declaratively from $STATE_FILE."
echo "Applying changes with env-update..."
env-update

View File

@@ -1,8 +0,0 @@
#!/bin/bash
# Returns a list of all the available power profiles on the system.
# Used by the Nomarchy Menu under Setup > Power Profile.
powerprofilesctl list |
awk '/^\s*[* ]\s*[a-zA-Z0-9\-]+:$/ { gsub(/^[*[:space:]]+|:$/,""); print }' |
tac

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Overwrite the user config for fastfetch with the Nomarchy default.
nomarchy-refresh-config fastfetch/config.jsonc

View File

@@ -1,7 +0,0 @@
#!/bin/bash
# Restart an application by killing it and relaunching via uwsm.
# Usage: nomarchy-restart-app <application-name> [application-args...]
pkill -x $1
setsid uwsm-app -- "$@" >/dev/null 2>&1 &

View File

@@ -1,7 +0,0 @@
#!/bin/bash
# Unblock and restart the bluetooth service.
echo -e "Unblocking bluetooth...\n"
rfkill unblock bluetooth
rfkill list bluetooth

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Reload btop configuration (used by the Nomarchy theme switching).
pkill -SIGUSR2 btop

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Reload hyprland configuration (used by the Nomarchy theme switching).
hyprctl reload >/dev/null

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Restart the hypridle service (used for idle detection and auto-lock).
nomarchy-restart-app hypridle

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Restart the hyprsunset service (used for blue light filtering/night light).
nomarchy-restart-app hyprsunset

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Restart makima - key remapping service for remapping Copilot key to Nomarchy Menu
sudo systemctl restart makima

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Reload mako configuration (used by the Nomarchy theme switching).
makoctl reload

View File

@@ -1,7 +0,0 @@
#!/bin/bash
# Reload opencode configuration (used by the Nomarchy theme switching).
if pgrep -x opencode >/dev/null; then
killall -SIGUSR2 opencode
fi

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# Restart the PipeWire audio service to fix audio issues or apply new configuration.
echo -e "Restarting pipewire audio service...\n"
systemctl --user restart pipewire.service

View File

@@ -1,3 +0,0 @@
#!/bin/bash
nomarchy-restart-app swayosd-server

View File

@@ -1,13 +0,0 @@
#!/bin/bash
if [[ -f ~/.config/alacritty/alacritty.toml ]]; then
touch ~/.config/alacritty/alacritty.toml
fi
if pgrep -x kitty >/dev/null; then
killall -SIGUSR1 kitty >/dev/null
fi
if pgrep -x ghostty >/dev/null; then
killall -SIGUSR2 ghostty
fi

View File

@@ -1,7 +0,0 @@
#!/bin/bash
# Restart tmux if running with the latest configuration
if pgrep -x tmux; then
tmux source-file ~/.config/tmux/tmux.conf
fi

View File

@@ -1,8 +0,0 @@
#!/bin/bash
# Reload the intel_quicki2c driver to fix a dead trackpad.
# The THC (Touch Host Controller) can fail to initialize interrupts
# during boot or after suspend, leaving the trackpad registered but
# not delivering events.
sudo modprobe -r intel_quicki2c && sudo modprobe intel_quicki2c

View File

@@ -1,22 +0,0 @@
#!/bin/bash
restart_services() {
if systemctl --user is-enabled elephant.service &>/dev/null; then
systemctl --user restart elephant.service
fi
if systemctl --user is-enabled app-walker@autostart.service &>/dev/null; then
systemctl --user restart app-walker@autostart.service
else
echo -e "\e[31mUnable to restart Walker -- RESTART MANUALLY\e[0m"
fi
}
if (( EUID == 0 )); then
SCRIPT_OWNER=$(stat -c '%U' "$0")
USER_UID=$(id -u "$SCRIPT_OWNER")
systemd-run --uid="$SCRIPT_OWNER" --setenv=XDG_RUNTIME_DIR="/run/user/$USER_UID" \
bash -c "$(declare -f restart_services); restart_services"
else
restart_services
fi

View File

@@ -1,3 +0,0 @@
#!/bin/bash
nomarchy-restart-app waybar

View File

@@ -1,7 +0,0 @@
#!/bin/bash
# Unblock and restart the Wi-Fi service.
echo -e "Unblocking wifi...\n"
rfkill unblock wifi
rfkill list wifi

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# Restart the XCompose input method service (fcitx5) to apply new compose key settings.
nomarchy-restart-app fcitx5 --disable notificationitem

View File

@@ -1,35 +0,0 @@
#!/usr/bin/env bash
# Configure DNS declaratively for Nomarchy NixOS.
# Hybrid: updates /etc/nixos/state.json and runs sys-update.
STATE_FILE="/etc/nixos/state.json"
if [[ -z $1 ]]; then
dns=$(gum choose --height 6 --header "Select DNS provider" Cloudflare Google DHCP Custom)
else
dns=$1
fi
case "$dns" in
Cloudflare|Google|DHCP)
sudo jq ".dns = \"$dns\"" "$STATE_FILE" > /tmp/state.json && sudo mv /tmp/state.json "$STATE_FILE"
;;
Custom)
echo "Enter your DNS servers (space-separated, e.g. '192.168.1.1 1.1.1.1'):"
read -r dns_servers
if [[ -z $dns_servers ]]; then
echo "Error: No DNS servers provided."
exit 1
fi
# Convert to JSON array
dns_array=$(echo "$dns_servers" | jq -R 'split(" ")')
sudo jq ".dns = \"Custom\" | .customDns = $dns_array" "$STATE_FILE" > /tmp/state.json && sudo mv /tmp/state.json "$STATE_FILE"
;;
esac
echo "DNS configured to $dns. Applying changes..."
sudo sys-update

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Configure FIDO2 support declaratively for Nomarchy NixOS.
STATE_FILE="/etc/nixos/state.json"
if [[ "--remove" == $1 ]]; then
sudo jq ".features.fido2 = false" "$STATE_FILE" > /tmp/state.json && sudo mv /tmp/state.json "$STATE_FILE"
echo "FIDO2 support disabled. Applying changes..."
sudo sys-update
exit 0
fi
sudo jq ".features.fido2 = true" "$STATE_FILE" > /tmp/state.json && sudo mv /tmp/state.json "$STATE_FILE"
echo "FIDO2 support enabled. Applying changes..."
sudo sys-update
# Enrollment is still an imperative action
if command -v pamu2fcfg &> /dev/null; then
echo "Let's register your FIDO2 key now."
mkdir -p ~/.config/Yubico
pamu2fcfg > ~/.config/Yubico/u2f_keys
echo "FIDO2 key registered."
else
echo "pamu2fcfg not found. It will be available after the next reboot or sys-update."
fi

View File

@@ -1,25 +0,0 @@
#!/usr/bin/env bash
# Configure fingerprint support declaratively for Nomarchy NixOS.
STATE_FILE="/etc/nixos/state.json"
if [[ "--remove" == $1 ]]; then
sudo jq ".features.fingerprint = false" "$STATE_FILE" > /tmp/state.json && sudo mv /tmp/state.json "$STATE_FILE"
echo "Fingerprint support disabled. Applying changes..."
sudo sys-update
exit 0
fi
sudo jq ".features.fingerprint = true" "$STATE_FILE" > /tmp/state.json && sudo mv /tmp/state.json "$STATE_FILE"
echo "Fingerprint support enabled. Applying changes..."
sudo sys-update
# Enrollment is still an imperative action
if command -v fprintd-enroll &> /dev/null; then
echo "Let's enroll your fingerprint now."
fprintd-enroll
echo "Fingerprint enrolled."
else
echo "fprintd not found. It will be available after the next reboot or sys-update."
fi

View File

@@ -1,22 +0,0 @@
#!/bin/bash
# Setup makima - key remapping service for remapping Copilot key to Nomarchy Menu
CONFIG_FILE="$HOME/.config/makima/AT Translated Set 2 keyboard.toml"
if [[ ! -f $CONFIG_FILE ]]; then
nomarchy-pkg-add makima-bin
mkdir -p "$HOME/.config/makima"
cp "$OMARCHY_PATH/default/makima/AT Translated Set 2 keyboard.toml" "$CONFIG_FILE"
sudo mkdir -p /etc/systemd/system/makima.service.d
sudo tee /etc/systemd/system/makima.service.d/override.conf >/dev/null <<EOF
[Service]
User=$USER
Environment="MAKIMA_CONFIG=/home/$USER/.config/makima"
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now makima 2>/dev/null || true
fi

View File

@@ -1,7 +0,0 @@
#!/bin/bash
# Display a "Done!" message with a spinner and wait for user to press any key.
# Used by various install scripts to indicate completion.
echo
gum spin --spinner "globe" --title "Done! Press any key to close..." -- bash -c 'read -n 1 -s'

View File

@@ -1,10 +0,0 @@
#!/bin/bash
# Display the Nomarchy logo in the terminal using green color.
# Used by various presentation scripts to show branding.
clear
echo -e "\033[32m"
cat <~/.local/share/nomarchy/logo.txt
echo -e "\033[0m"
echo

View File

@@ -1,34 +0,0 @@
#!/bin/bash
set -e
COMMAND="$1"
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/nomarchy}
if [[ -z $COMMAND ]]; then
echo "Usage: nomarchy-snapshot <create|restore>" >&2
exit 1
fi
if ! command -v snapper &>/dev/null; then
exit 127 # nomarchy-update can use this to just ignore if snapper is not available
fi
case "$COMMAND" in
create)
DESC="$(nomarchy-version)"
echo -e "\e[32mCreate system snapshot\e[0m"
# Get existing snapper config names from CSV output
mapfile -t CONFIGS < <(sudo snapper --csvout list-configs | awk -F, 'NR>1 {print $1}')
for config in "${CONFIGS[@]}"; do
sudo snapper -c "$config" create -c number -d "$DESC"
done
echo
;;
restore)
sudo limine-snapper-restore
;;
esac

View File

@@ -1,28 +0,0 @@
#!/bin/bash
# Manage persistent runtime state files for Nomarchy indicators.
# Usage: nomarchy-state <set|clear> <state-name-or-pattern>
# Used to track whether things like reboot, restart, etc are required.
# DO NOT use this for configuration toggles (suspend, screensaver, etc).
# Use declarative Nomarchy NixOS home-manager options for those instead.
STATE_DIR="$HOME/.local/state/nomarchy"
mkdir -p "$STATE_DIR"
COMMAND="$1"
STATE_NAME="$2"
if [[ -z $COMMAND ]]; then
echo "Usage: nomarchy-state <set|clear> <state-name-or-pattern>"
exit 1
fi
if [[ -z $STATE_NAME ]]; then
echo "Usage: nomarchy-state $COMMAND <state-name>"
exit 1
fi
case "$COMMAND" in
set) touch "$STATE_DIR/$STATE_NAME" ;;
clear) find "$STATE_DIR" -maxdepth 1 -type f -name "$STATE_NAME" -delete ;;
esac

View File

@@ -1,10 +0,0 @@
#!/bin/bash
# Prompt for sudo once and keep the credential alive in the background.
# Source this script so the trap applies to the calling shell:
# source nomarchy-sudo-keepalive
sudo -v
while true; do sudo -n true; sleep 60; done 2>/dev/null &
SUDO_KEEPALIVE_PID=$!
trap "kill $SUDO_KEEPALIVE_PID 2>/dev/null" EXIT

Some files were not shown because too many files have changed in this diff Show More