Optionalize the stylix.image option when stylix.base16Scheme is set,
making the following Stylix configurations valid:
[
// Now it possible to set 'stylix.image = null', if
// stylix.base16Scheme is set.
{
base16Scheme = /* ... */;
}
// This configuration was already possible.
{
image = /* ... */;
}
// This configuration was already possible.
{
base16Scheme = /* ... */;
image = /* ... */;
}
]
Closes: https://github.com/danth/stylix/issues/200
Closes: https://github.com/danth/stylix/issues/442
Link: https://github.com/danth/stylix/pull/717
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Tested-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
Reviewed-by: Daniel Thwaites <danth@danth.me>
18 lines
422 B
Nix
18 lines
422 B
Nix
{ config, lib, ... }:
|
|
let
|
|
cfg = config.stylix.targets.hyprpaper;
|
|
in
|
|
{
|
|
options.stylix.targets.hyprpaper = {
|
|
enable = config.lib.stylix.mkEnableTarget "Hyprpaper" (
|
|
config.stylix.image != null
|
|
);
|
|
};
|
|
|
|
config = lib.mkIf (config.stylix.enable && cfg.enable) {
|
|
services.hyprpaper.settings = {
|
|
preload = [ "${config.stylix.image}" ];
|
|
wallpaper = [ ",${config.stylix.image}" ];
|
|
};
|
|
};
|
|
}
|