{ config, pkgs, ... }:
let
  colors = config.lib.stylix.colors;
in
{
  programs.swaylock = {
    enable = true;
    package = pkgs.swaylock-effects;
    settings = {
      screenshot = true;
      clock = true;
      indicator = true;
      indicator-radius = 100;
      indicator-thickness = 7;
      effect-blur = "7x5";
      effect-vignette = "0.5:0.5";
      grace = 2;
      fade-in = 0.2;

      font = "Sans";
      timestr = "%H:%M";
      datestr = "%a, %b %e";

      bs-hl-color = "${colors.base08}";
      key-hl-color = "${colors.base0B}";
      separator-color = "00000000";
      inside-color = "00000088";
      inside-clear-color = "${colors.base0A}88";
      inside-ver-color = "${colors.base0D}88";
      inside-wrong-color = "${colors.base08}88";
      line-color = "00000000";
      line-clear-color = "00000000";
      line-ver-color = "00000000";
      line-wrong-color = "00000000";
      ring-color = "${colors.base02}";
      ring-clear-color = "${colors.base0A}";
      ring-ver-color = "${colors.base0D}";
      ring-wrong-color = "${colors.base08}";
      text-color = "${colors.base05}";
      text-clear-color = "${colors.base00}";
      text-ver-color = "${colors.base00}";
      text-wrong-color = "${colors.base00}";
    };
  };
}
