stylix: improve stylix.image type (#1414)
Previously: - Out-of-store paths were not necessarily copied to store. - Derivations were needlessly coerced to strings. - `package` and `path` were both used, despite `path` being a superset of `package`. Link: https://github.com/nix-community/stylix/pull/1414 Reviewed-by: awwpotato <awwpotato@voidq.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
parent
4a121321d3
commit
838df8b8ad
1 changed files with 4 additions and 1 deletions
|
|
@ -29,7 +29,10 @@ in
|
|||
};
|
||||
|
||||
image = lib.mkOption {
|
||||
type = with lib.types; nullOr (coercedTo package toString path);
|
||||
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}";
|
||||
description = ''
|
||||
Wallpaper image.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue