{ lib, pkgs, config, ... }: with lib; let cfg = config.eboskma.programs.alacritty; importYAML = name: yamlFile: (lib.importJSON ((pkgs.runCommandNoCC name {} '' mkdir -p $out ${pkgs.yaml2json}/bin/yaml2json < ${yamlFile} | ${pkgs.jq}/bin/jq -a '.' > $out/tmp.json '') .outPath + "/tmp.json")); theme = importYAML "theme" (builtins.fetchurl { url = "https://raw.githubusercontent.com/dracula/alacritty/05faff15c0158712be87d200081633d9f4850a7d/dracula.yml"; sha256 = "1366rvvni2shbqlcrbypjv4f7p7ccdr6bvr685jnj8ipwqjjb6rn"; }); in { options.eboskma.programs.alacritty.enable = mkEnableOption "Enable alacritty"; config = mkIf cfg.enable { programs.alacritty = { enable = true; settings = { window = { decorations = "full"; startup_mode = "Maximized"; }; scrolling = { history = 100000; }; font = { normal = { family = "Iosevka Nerd Font"; style = "Medium"; }; size = 10.0; }; inherit (theme) colors; # colors = { # primary = { # background = "#2e3440"; # foreground = "#d8dee9"; # dim_foreground = "#a5abb6"; # }; # cursor = { # text = "#2e3440"; # cursor = "#d8dee9"; # }; # vi_mode_cursor = { # text = "#2e3440"; # cursor = "#d8dee9"; # }; # selection = { # text = "CellForeground"; # background = "#4c566a"; # }; # search = { # matches = { # foreground = "CellBackground"; # background = "#88c0d0"; # }; # bar = { # background = "#434c5e"; # foreground = "#d8dee9"; # }; # }; # normal = { # black = "#3b4252"; # red = "#bf616a"; # green = "#a3be8c"; # yellow = "#ebcb8b"; # blue = "#81a1c1"; # magenta = "#b48ead"; # cyan = "#88c0d0"; # white = "#e5e9f0"; # }; # bright = { # black = "#4c566a"; # red = "#bf616a"; # green = "#a3be8c"; # yellow = "#ebcb8b"; # blue = "#81a1c1"; # magenta = "#b48ead"; # cyan = "#8fbcbb"; # white = "#eceff4"; # }; # dim = { # black = "#373e4d"; # red = "#94545d"; # green = "#809575"; # yellow = "#b29e75"; # blue = "#68809a"; # magenta = "#8c738c"; # cyan = "#6d96a5"; # white = "#aeb3bb"; # }; # }; background_opacity = 0.9; live_config_reload = true; mouse = { hide_when_typing = true; }; }; }; }; }