feat: migrate theme and font to declarative Nix options
Some checks failed
Check / eval-and-lint (push) Has been cancelled

This commit is contained in:
Bernardo Magri
2026-05-31 19:33:33 +01:00
parent a2649728d3
commit 130ae80f3e
6 changed files with 33 additions and 42 deletions

View File

@@ -61,7 +61,10 @@ in
theme = lib.mkOption {
type = lib.types.str;
default = schema.system.theme;
description = "Selected system theme.";
description = ''
Selected system theme. This is the declarative source of truth for
system-level components (SDDM, Plymouth, browser policies).
'';
};
# ----- Tier 1 system features (all opt-in, no behavioural change off) ---

View File

@@ -10,20 +10,8 @@ in
{
# Every assignment is lib.mkDefault so a downstream /etc/nixos/system.nix
# can still set e.g. `nomarchy.system.features.hybridGPU = true;`
# without colliding with the state.json-derived value. Without
# mkDefault, every state.json-driven option was unoverridable from
# Nix — flipping hybridGPU required jq'ing the state file rather
# than declaring it in your config.
# without colliding with the default values. The Nix options are now the
# declarative source of truth.
config.nomarchy.system = {
dns = lib.mkDefault (systemState.dns or schema.system.dns);
customDns = lib.mkDefault (systemState.customDns or schema.system.customDns);
wifi.powersave = lib.mkDefault (systemState.wifi.powersave or schema.system.wifi.powersave);
timezone = lib.mkDefault (systemState.timezone or schema.system.timezone);
features = {
fingerprint = lib.mkDefault (systemState.features.fingerprint or schema.system.features.fingerprint);
fido2 = lib.mkDefault (systemState.features.fido2 or schema.system.features.fido2);
hybridGPU = lib.mkDefault (systemState.features.hybridGPU or schema.system.features.hybridGPU);
};
theme = lib.mkDefault (systemState.theme or schema.system.theme);
};
}