Merge pull request 'wave/qa-core-system' (#3) from wave/qa-core-system into main

Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
2026-05-19 19:17:22 +01:00
6 changed files with 27 additions and 7 deletions

View File

@@ -15,9 +15,9 @@ in
settings.Login = { settings.Login = {
HandleLidSwitch = lib.mkDefault "suspend-then-hibernate"; HandleLidSwitch = lib.mkDefault "suspend-then-hibernate";
HandleLidSwitchExternalPower = lib.mkDefault "suspend"; HandleLidSwitchExternalPower = lib.mkDefault "suspend";
HandlePowerKey = "hibernate"; HandlePowerKey = lib.mkDefault "hibernate";
IdleAction = "suspend-then-hibernate"; IdleAction = lib.mkDefault "suspend-then-hibernate";
IdleActionSec = toString (cfg.idleMinutes * 60); IdleActionSec = lib.mkDefault (toString (cfg.idleMinutes * 60));
}; };
}; };
}; };

View File

@@ -24,6 +24,18 @@ in
"crypted_main" on multi-disk installs to match the disko layout. "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.<name>` 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 { config = lib.mkIf cfg.enable {
@@ -72,7 +84,7 @@ in
"/etc/machine-id" "/etc/machine-id"
"/etc/supergfxd.conf" "/etc/supergfxd.conf"
]; ];
users.nomarchy = { users.${cfg.user} = {
directories = [ directories = [
".ssh" ".ssh"
".gnupg" ".gnupg"

View File

@@ -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). `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. `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.<name>` — 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`) ## Home Manager options (`home.nix`)

View File

@@ -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. - **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. - **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. - **`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 ## 3. Pillar: Script & menu audit

View File

@@ -1459,7 +1459,7 @@ generate_flake_config() {
if (( ${#_drives[@]} > 1 )); then if (( ${#_drives[@]} > 1 )); then
_main_luks_name="crypted_main" _main_luks_name="crypted_main"
fi 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 fi
local PROFILE_SYSTEM_OPTS="" local PROFILE_SYSTEM_OPTS=""

View File

@@ -57,7 +57,6 @@
fingerprint = false; fingerprint = false;
fido2 = false; fido2 = false;
hybridGPU = false; hybridGPU = false;
makima = false;
}; };
}; };