nixos-config/home-manager/modules/alacritty/default.nix

109 lines
2.9 KiB
Nix
Raw Normal View History

{ lib
, pkgs
, config
, ...
2022-03-01 22:19:03 +01:00
}:
with lib; let
2021-11-17 16:32:18 +01:00
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"));
2021-12-18 16:23:14 +01:00
theme = importYAML "theme" (builtins.fetchurl {
url = "https://raw.githubusercontent.com/dracula/alacritty/05faff15c0158712be87d200081633d9f4850a7d/dracula.yml";
sha256 = "1366rvvni2shbqlcrbypjv4f7p7ccdr6bvr685jnj8ipwqjjb6rn";
});
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;
settings = {
window = {
decorations = "full";
startup_mode = "Maximized";
};
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";
};
size = 10.0;
};
2021-12-18 16:23:14 +01:00
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;
2021-11-17 16:32:18 +01:00
};
};
};
};
}