83 lines
2 KiB
Nix
83 lines
2 KiB
Nix
{ pkgs, lib, config, ... }:
|
|
let
|
|
cfg = config.mae.alacritty;
|
|
alacrittyLibGL = pkgs.symlinkJoin {
|
|
name = "alacritty-nixgl";
|
|
paths = [
|
|
(pkgs.writeShellScriptBin
|
|
"alacritty"
|
|
''
|
|
${pkgs.nixgl.nixGLIntel}/bin/nixGLIntel ${pkgs.alacritty}/bin/alacritty "$@"
|
|
'')
|
|
pkgs.alacritty
|
|
];
|
|
};
|
|
in
|
|
{
|
|
options.mae.alacritty = {
|
|
enable = lib.mkEnableOption "Enable the alacritty terminal";
|
|
libglWrapper = lib.mkOption {
|
|
default = false;
|
|
type = lib.types.bool;
|
|
description = "Wrap alacritty in libgl to make it work on non nixos systems";
|
|
};
|
|
};
|
|
config = lib.mkIf cfg.enable {
|
|
fonts.fontconfig.enable = true;
|
|
home.packages = [
|
|
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
|
];
|
|
programs.alacritty = {
|
|
package = lib.mkIf cfg.libglWrapper alacrittyLibGL;
|
|
enable = true;
|
|
settings = {
|
|
window = {
|
|
padding = {
|
|
x = 6;
|
|
y = 6;
|
|
};
|
|
};
|
|
font = {
|
|
normal = {
|
|
family = "JetBrainsMono Nerd Font";
|
|
};
|
|
size = 12;
|
|
};
|
|
colors = {
|
|
primary = {
|
|
background = "#161821";
|
|
foreground = "#d2d4de";
|
|
};
|
|
normal = {
|
|
black = "#161821";
|
|
red = "#e27878";
|
|
green = "#b4be82";
|
|
yellow = "#e2a478";
|
|
blue = "#84a0c6";
|
|
magenta = "#a093c7";
|
|
cyan = "#89b8c2";
|
|
white = "#c6c8d1";
|
|
};
|
|
bright = {
|
|
black = "#6b7089";
|
|
red = "#e98989";
|
|
green = "#c0ca8e";
|
|
yellow = "#e9b189";
|
|
blue = "#91acd1";
|
|
magenta = "#ada0d3";
|
|
cyan = "#95c4ce";
|
|
white = "#d2d4de";
|
|
};
|
|
};
|
|
cursor = {
|
|
style = "Block";
|
|
blinking = "On";
|
|
};
|
|
live_config_reload = false;
|
|
mouse = {
|
|
hide_when_typing = false;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|