From 99a6c7d547335fd5f7d4905e0954805e34aedd0e Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Tue, 19 May 2026 17:50:27 +0100 Subject: [PATCH 1/4] fix(impermanence): user must match created account, not hardcoded "nomarchy" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- core/system/impermanence.nix | 14 +++++++++++++- docs/OPTIONS.md | 10 +++++++++- installer/install.sh | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/core/system/impermanence.nix b/core/system/impermanence.nix index 7bfa1c5..009d931 100644 --- a/core/system/impermanence.nix +++ b/core/system/impermanence.nix @@ -24,6 +24,18 @@ in "crypted_main" on multi-disk installs to match the disko layout. ''; }; + + user = lib.mkOption { + type = lib.types.str; + default = "nomarchy"; + description = '' + Primary user whose home subset (.ssh, .gnupg, keyrings, common + directories) survives the rootfs wipe. Must match the user + created via `users.users.` — otherwise the persistence + block is silently inert and the user's home directory is wiped + on every boot. The installer writes this for you. + ''; + }; }; config = lib.mkIf cfg.enable { @@ -72,7 +84,7 @@ in "/etc/machine-id" "/etc/supergfxd.conf" ]; - users.nomarchy = { + users.${cfg.user} = { directories = [ ".ssh" ".gnupg" diff --git a/docs/OPTIONS.md b/docs/OPTIONS.md index bdc803b..b151772 100644 --- a/docs/OPTIONS.md +++ b/docs/OPTIONS.md @@ -153,10 +153,18 @@ Without prime config, supergfxd still switches modes but render-offload via `nvi `bool`, default `false`. Intel IPU7 camera support (kernel modules + firmware). -### `impermanence.enable` +### `nomarchy.system.impermanence.enable` `bool`, default `false`. Erase Your Darlings root wipe on boot. Defined in `core/system/impermanence.nix`. The installer writes the flag based on the impermanence prompt. +### `nomarchy.system.impermanence.mainLuksName` + +`str`, default `"crypted"`. Name of the `/dev/mapper` entry holding the BTRFS root. The disko layout uses `"crypted"` on single-disk installs and `"crypted_main"` once multiple drives are selected — the installer writes the matching value automatically. + +### `nomarchy.system.impermanence.user` + +`str`, default `"nomarchy"`. Primary user whose home subset (`.ssh`, `.gnupg`, `.local/share/keyrings`, `Documents`, `Downloads`, `Pictures`, `Videos`, `Projects`) survives the rootfs wipe. Must match the user created via `users.users.` — otherwise the persistence block is silently inert and the user's home directory is wiped on every boot. The installer writes this for you. + --- ## Home Manager options (`home.nix`) diff --git a/installer/install.sh b/installer/install.sh index 094c1d1..d3e2454 100755 --- a/installer/install.sh +++ b/installer/install.sh @@ -1459,7 +1459,7 @@ generate_flake_config() { if (( ${#_drives[@]} > 1 )); then _main_luks_name="crypted_main" fi - impermanence_opt=$'nomarchy.system.impermanence.enable = true;\n nomarchy.system.impermanence.mainLuksName = "'"$_main_luks_name"$'";' + impermanence_opt=$'nomarchy.system.impermanence.enable = true;\n nomarchy.system.impermanence.mainLuksName = "'"$_main_luks_name"$'";\n nomarchy.system.impermanence.user = "'"$USERNAME"$'";' fi local PROFILE_SYSTEM_OPTS="" -- 2.49.1 From fb4d5d7acc3e96088c5348e8d04c7ac90c2a6e29 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Tue, 19 May 2026 17:50:32 +0100 Subject: [PATCH 2/4] chore(schema): drop orphan features.makima MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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. --- lib/state-schema.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/state-schema.nix b/lib/state-schema.nix index d4723ed..444cc2e 100644 --- a/lib/state-schema.nix +++ b/lib/state-schema.nix @@ -57,7 +57,6 @@ fingerprint = false; fido2 = false; hybridGPU = false; - makima = false; }; }; -- 2.49.1 From 6238f41e432678afa24e42818f124506e6190f93 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Tue, 19 May 2026 17:50:37 +0100 Subject: [PATCH 3/4] 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. --- core/system/hibernate.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/system/hibernate.nix b/core/system/hibernate.nix index ce19b2e..fa09859 100644 --- a/core/system/hibernate.nix +++ b/core/system/hibernate.nix @@ -15,9 +15,9 @@ in settings.Login = { HandleLidSwitch = lib.mkDefault "suspend-then-hibernate"; HandleLidSwitchExternalPower = lib.mkDefault "suspend"; - HandlePowerKey = "hibernate"; - IdleAction = "suspend-then-hibernate"; - IdleActionSec = toString (cfg.idleMinutes * 60); + HandlePowerKey = lib.mkDefault "hibernate"; + IdleAction = lib.mkDefault "suspend-then-hibernate"; + IdleActionSec = lib.mkDefault (toString (cfg.idleMinutes * 60)); }; }; }; -- 2.49.1 From af8fa321ff7d5407b65d329b498aaec7a5ed7360 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Tue, 19 May 2026 17:50:44 +0100 Subject: [PATCH 4/4] docs(roadmap): log uwsm-in-virtualization module placement (Later) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- docs/ROADMAP.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index c7ca112..a90e508 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -43,6 +43,7 @@ Guardrails (apply when adding anything): - **Consolidate palette imports in `flake.nix` via `nomarchyLib`.** `flake.nix:79-80` re-imports `./themes/palettes` and recomputes `themeNames` even though `lib/default.nix` already exports both. Two computations, same result today — drift risk tomorrow. Import `nomarchyLib = import ./lib { inherit lib; }` once and use `nomarchyLib.{palettes,themeNames}` to make `lib/default.nix` the single source of truth for the theme list. - **Decide what to do about `features/apps/chromium/Default/Preferences`.** The module deploys a static 204-byte `Default/Preferences` (setting `extensions.theme.use_system = false`, `browser.theme.color_scheme = 2`) into chromium's mutable profile directory via Home Manager symlink. 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 real chromium theming work happens via managed policies in `core/system/browser.nix`. Probably the user-profile deployment should be removed; needs someone with chromium-internals knowledge to confirm before deletion. - **`themes/templates/*.tpl` — decide what these are for.** Eleven mustache-style templates (`alacritty.toml.tpl`, `btop.theme.tpl`, `kitty.conf.tpl`, etc.) are deployed to `~/.local/share/nomarchy/templates/` via `themes/engine/files.nix`, but no script in the tree consumes them. Likely vestigial from a pre-stylix templating system. Either delete the directory + the `xdg.dataFile` deployment, or document them as user-reference assets and explain how to use them. +- **Move `programs.uwsm` Hyprland session out of `core/system/virtualization.nix`.** Session-manager config is wired in the virtualization module by historical accident — it's loaded unconditionally on every install and has nothing to do with libvirt/docker. Move to a dedicated `core/system/session.nix` (or fold into the Hyprland feature module) so the location matches the responsibility. ## 3. Pillar: Script & menu audit -- 2.49.1