11.stylix/modules/hyprpaper/hm.nix
Flameopathic c8e4a0d218
treewide: optionalize stylix.image option (#717)
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>
2025-02-24 15:13:57 +01:00

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}" ];
};
};
}