11.stylix/modules/hyprlock/hm.nix
David Neugebauer 2111394586
Convert image path to string for Hyprlock fixing #918 (#925)
Closes: https://github.com/danth/stylix/issues/918
Fixes: c8e4a0d218 ("treewide: optionalize stylix.image option (#717)")

Tested-by: https://github.com/Stormfox2
Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-02-27 09:11:20 +01:00

29 lines
728 B
Nix

{ config, lib, ... }:
with config.lib.stylix;
let
cfg = config.stylix.targets.hyprlock;
in
{
options.stylix.targets.hyprlock = {
enable = mkEnableTarget "Hyprlock" true;
useWallpaper = mkEnableWallpaper "Hyprlock" true;
};
config = lib.mkIf (config.stylix.enable && cfg.enable) {
programs.hyprlock.settings = {
background = {
color = "rgb(${colors.base00})";
path = lib.mkIf cfg.useWallpaper "${config.stylix.image}";
};
input-field = with colors; {
outer_color = "rgb(${base03})";
inner_color = "rgb(${base00})";
font_color = "rgb(${base05})";
fail_color = "rgb(${base08})";
check_color = "rgb(${base0A})";
};
};
};
}