From ca1bc329e91039435450d19c0e31655c1efd3f0f Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Thu, 8 Jan 2026 20:55:49 +0100 Subject: [PATCH] stylix/palette: coerce derivations to store paths Coerce derivations to store paths to ensure non-null values are stringified store paths with valid string contexts. Fixes: 838df8b8ad7d ("stylix: improve `stylix.image` type (#1414)") Co-authored-by: Matt Sturgeon --- stylix/palette.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stylix/palette.nix b/stylix/palette.nix index 9e72a67e..260f850f 100644 --- a/stylix/palette.nix +++ b/stylix/palette.nix @@ -28,10 +28,8 @@ in }; image = lib.mkOption { - type = lib.types.nullOr lib.types.path; # Ensure the path is copied to the store - apply = - value: if value == null || lib.isDerivation value then value else "${value}"; + type = with lib.types; nullOr (coercedTo path (src: "${src}") pathInStore); description = '' Wallpaper image.