{
  config,
  pkgs,
  lib,
  ...
}: let
  cfg = config.marleyos.programs.glow;
  toYAML = (pkgs.formats.yaml {}).generate;
in {
  options.marleyos.programs.glow.enable = lib.mkEnableOption "glow";

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

    xdg.configFile."glow/glow.yml".source = toYAML "glow.yml" {
      style = "pink";
      mouse = true;
      pager = true;
      width = 80;
    };
  };
}
