{ config, lib, pkgs, ... }:

with lib;
let
  cfg = config.samfelag.modules.app.alacritty;
in
{
  options.samfelag.modules.app.alacritty = {
    enable = mkEnableOption "alacritty";
  };

  config = mkIf cfg.enable {
    fonts.fontconfig.enable = true;    
    home.packages = with pkgs; [
      alacritty
      (nerdfonts.override { fonts = [ "Iosevka" ]; })
    ];

    xdg.configFile."alacritty".source = ../../../config/.config/alacritty;
  };
}
