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.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
# Tier 1 system features (all opt-in via nomarchy.system.*).
|
||||
./snapper.nix
|
||||
./laptop.nix
|
||||
./desktop.nix
|
||||
./hibernate.nix
|
||||
./containers.nix
|
||||
./pam.nix
|
||||
|
||||
15
core/system/desktop.nix
Normal file
15
core/system/desktop.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.nomarchy.system.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
|
||||
# No-op until the user adds ZFS to boot.supportedFilesystems and a pool;
|
||||
# then maintenance kicks in without further config.
|
||||
services.zfs.autoScrub.enable = lib.mkDefault true;
|
||||
services.zfs.trim.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -108,6 +108,24 @@
|
||||
};
|
||||
};
|
||||
|
||||
desktop = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.nomarchy.system.formFactor == "desktop";
|
||||
defaultText = lib.literalExpression ''config.nomarchy.system.formFactor == "desktop"'';
|
||||
description = ''
|
||||
Desktop preset: pins `powerManagement.cpuFreqGovernor` to
|
||||
`"performance"` and enables `services.zfs.autoScrub` and
|
||||
`services.zfs.trim` so a future ZFS pool gets sensible
|
||||
maintenance without further config. The ZFS knobs are no-ops
|
||||
until the user adds `boot.supportedFilesystems = [ "zfs" ]`
|
||||
and a pool. Defaults on when `formFactor = "desktop"`. Battery
|
||||
widget filtering is already handled by `formFactor` itself in
|
||||
`features/desktop/waybar/default.nix`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
containers = {
|
||||
enable = lib.mkEnableOption ''
|
||||
Rootless Podman with Docker compatibility (`docker` → `podman`),
|
||||
|
||||
@@ -75,6 +75,10 @@ Wired in `features/desktop/waybar/default.nix` (filters the battery widget out o
|
||||
|
||||
`bool`, default `true` on x86_64. Enables `services.thermald` (Intel thermal daemon). Harmless no-op on AMD; gated off on aarch64.
|
||||
|
||||
### `nomarchy.system.desktop.enable`
|
||||
|
||||
`bool`, default `nomarchy.system.formFactor == "desktop"`. Desktop preset: pins `powerManagement.cpuFreqGovernor` to `"performance"` (via `mkDefault`) and enables `services.zfs.autoScrub` + `services.zfs.trim` so a future ZFS pool gets sensible maintenance without further config. The ZFS knobs are no-ops until you add `boot.supportedFilesystems = [ "zfs" ]` (plus `networking.hostId`) and a pool. Battery-widget filtering is handled by `formFactor` itself, so this preset doesn't repeat it.
|
||||
|
||||
### `nomarchy.system.containers.enable`
|
||||
|
||||
`bool`, default `false`. Rootless Podman with Docker compatibility (`docker` → `podman`), plus `podman-compose`, `podman-tui`, and `dive`.
|
||||
|
||||
@@ -23,7 +23,6 @@ Guardrails (apply when adding anything):
|
||||
|
||||
### Next (bigger lifts that build on Now)
|
||||
|
||||
- **Desktop preset module.** CPU governor `performance` by default, no battery widget (already done), ZFS-friendly defaults for users who later add a pool.
|
||||
- **Accessibility preset.** Larger cursor, slower key-repeat defaults, `services.orca`, screen reader keybinding, high-contrast theme variant.
|
||||
- **Gaming preset.** `programs.steam.enable`, `programs.gamemode.enable`, `services.flatpak.enable` with a curated remote, and a Hyprland window-rule to fullscreen Steam-launched apps.
|
||||
- **First-run welcome wizard.** Extend `nomarchy-welcome` from a one-shot greeter into a guided picker: theme, panel position, monospace font, "what's a sane home.nix to start with?". Runs once, persists "done" in `state.json`.
|
||||
@@ -125,6 +124,7 @@ Each PR description should reference the row(s) in `docs/SCRIPTS.md` it closes,
|
||||
|
||||
(Move items here when they land — keep them brief, link the commit/PR.)
|
||||
|
||||
- _2026-04-26_ — Desktop preset module (`core/system/desktop.nix`). New `nomarchy.system.desktop.enable` option; defaults to `formFactor == "desktop"` (mirror of the laptop preset's auto-enable). Pins `powerManagement.cpuFreqGovernor` to `"performance"` and enables `services.zfs.{autoScrub,trim}` so a future ZFS pool gets sensible maintenance for free.
|
||||
- _2026-04-26_ — Laptop preset module (`core/system/laptop.nix`). New `nomarchy.system.laptop.{enable,thermald}` options; `enable` defaults to `formFactor == "laptop"` so the installer's existing `formFactor` write auto-flips it on. Wires TLP (governors + 75/80 charge thresholds), force-disables `power-profiles-daemon`, enables `upower` and `thermald` (x86_64), adds the brightnessctl udev rule for backlight without root, and sets a logind lid-switch policy that defers to `hibernation.enable`. Closes both the Now item and the largest Next item.
|
||||
- _2026-04-25_ — Software-profile multi-select in the installer. Users can now pick Dev, Gaming, Office, Media, and CLI Utils profiles during install; logic emits corresponding `home.packages` and system toggles into the generated config.
|
||||
- _2026-04-25_ — Pillar 3 Phase B: script & menu audit. Ported/implemented/stubbed ~40 scripts including `nomarchy-version`, `nomarchy-debug`, `nomarchy-reinstall`, `nomarchy-rollback`, `nomarchy-update-firmware`, `nomarchy-pkg-*`, and `nomarchy-theme-*` wrappers. Moved desktop scripts to packaged utility directory.
|
||||
|
||||
Reference in New Issue
Block a user