From 05e53b52b66a175c2a88db1a09a782d3b9ed2439 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Mon, 26 Jan 2026 19:33:11 +0100 Subject: [PATCH] stylix/palette: allow impure absolute stylix.image path (#2150) Allow an impure absolute stylix.image path for end-user convenience by relaxing the guarantees established in commits ca1bc329e910 ("stylix/palette: coerce derivations to store paths") and 61c9f4dd1435 ("treewide: remove redundant stylix.image escaping and string coercion"). When stylix.image cannot be copied to the store, it is not guaranteed to be a stringified store path with a valid string context and no special characters, resulting in UB. Link: https://github.com/nix-community/stylix/pull/2150 Reviewed-by: Matt Sturgeon Reviewed-by: 0xda157 --- stylix/palette.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stylix/palette.nix b/stylix/palette.nix index 260f850f..69d47f98 100644 --- a/stylix/palette.nix +++ b/stylix/palette.nix @@ -29,7 +29,14 @@ in image = lib.mkOption { # Ensure the path is copied to the store - type = with lib.types; nullOr (coercedTo path (src: "${src}") pathInStore); + type = + with lib.types; + nullOr ( + coercedTo path (src: "${src}") path + // { + inherit (path) description descriptionClass; + } + ); description = '' Wallpaper image.