From f42d4482ff453e30e9658a77f78318c52307bd49 Mon Sep 17 00:00:00 2001 From: Padreug Date: Sun, 28 Jun 2026 10:43:53 +0200 Subject: [PATCH] fix(fastfetch): handle null omnixy.preset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `${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 --- modules/fastfetch.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/fastfetch.nix b/modules/fastfetch.nix index 02549e1..4b4ec8b 100644 --- a/modules/fastfetch.nix +++ b/modules/fastfetch.nix @@ -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" }, {