2024-02-05 11:46:52 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
2022-03-01 22:19:03 +01:00
|
|
|
}:
|
2024-02-05 11:46:52 +01:00
|
|
|
with lib;
|
|
|
|
let
|
2021-11-17 16:32:18 +01:00
|
|
|
cfg = config.eboskma.programs.alacritty;
|
2024-02-05 11:46:52 +01:00
|
|
|
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/77aff04b9f2651eac10e5cfa80a3d85ce43e7985/dracula.yml";
|
2024-07-09 21:32:01 +02:00
|
|
|
hash = "sha256-NoEBy8cUs6KDfougzAIcuX9oSAltO7y9OOeXJbSQKrY=";
|
2024-02-05 11:46:52 +01:00
|
|
|
}
|
|
|
|
);
|
2022-04-27 00:21:19 +02:00
|
|
|
in
|
|
|
|
{
|
2021-11-17 16:32:18 +01:00
|
|
|
options.eboskma.programs.alacritty.enable = mkEnableOption "Enable alacritty";
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
programs.alacritty = {
|
|
|
|
enable = true;
|
2022-11-11 17:07:24 +01:00
|
|
|
|
2021-11-17 16:32:18 +01:00
|
|
|
settings = {
|
2022-11-11 17:07:24 +01:00
|
|
|
inherit (theme) colors;
|
|
|
|
|
2021-11-17 16:32:18 +01:00
|
|
|
window = {
|
|
|
|
decorations = "full";
|
|
|
|
startup_mode = "Maximized";
|
2022-11-11 17:07:24 +01:00
|
|
|
opacity = 0.9;
|
2021-11-17 16:32:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
scrolling = {
|
|
|
|
history = 100000;
|
|
|
|
};
|
|
|
|
font = {
|
|
|
|
normal = {
|
2021-11-25 17:18:13 +01:00
|
|
|
family = "Iosevka Nerd Font";
|
2021-11-17 16:32:18 +01:00
|
|
|
style = "Medium";
|
|
|
|
};
|
2022-12-09 10:37:48 +01:00
|
|
|
size = 14.0;
|
2021-11-17 16:32:18 +01:00
|
|
|
};
|
2022-11-11 17:07:24 +01:00
|
|
|
|
2021-12-18 16:23:14 +01:00
|
|
|
live_config_reload = true;
|
|
|
|
mouse = {
|
|
|
|
hide_when_typing = true;
|
2021-11-17 16:32:18 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|