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: 838df8b8ad ("stylix: improve `stylix.image` type (#1414)")
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
This commit is contained in:
parent
3f6651a26e
commit
ca1bc329e9
1 changed files with 1 additions and 3 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue