{
  options,
  config,
  lib,
  pkgs,
  inputs,
  ...
}:
let
  cfg = config.modules.desktop.addons.mako;
  inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
    palette
    ;
in
{
  options.modules.desktop.addons.mako =
    with lib.frajul;
    with lib.types;
    {
      enable = mkBoolOpt false "Enable or disable mako";
    };

  config = lib.mkIf cfg.enable {
    home.packages = with pkgs; [ libnotify ];

    services.mako = {
      enable = true;
      defaultTimeout = 5000; # milliseconds, can be overwritten by notification sender
      backgroundColor = "#${palette.base00}";
      textColor = "#${palette.base05}";
      borderColor = "#${palette.base0D}";
      progressColor = "over #${palette.base02}";
      extraConfig = ''
        [urgency=high]
        border-color=#${palette.base09}
      '';
    };
  };
}
