fix(fastfetch): handle null omnixy.preset

`${cfg.preset or "custom"}` only falls back when the attr is missing,
not when it's null — and omnixy.preset defaults to null. A host that
doesn't set a preset (any consumer of nixosModules.omnixy) hit 'cannot
coerce null to a string'. Use an explicit null check. Surfaced by the
dependency-model consumer test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-28 10:43:53 +02:00
commit f42d4482ff

View file

@ -165,7 +165,7 @@ in
},
{
"type": "custom",
"format": " 󰣇 Preset: ${cfg.preset or "custom"}",
"format": " 󰣇 Preset: ${if cfg.preset == null then "custom" else cfg.preset}",
"keyColor": "magenta"
},
{