add alacritty custom config

This commit is contained in:
panda 2026-05-06 21:24:25 +02:00
parent 9de7891280
commit 0f2b2fd07c
2 changed files with 51 additions and 1 deletions

48
configs/alacritty.nix Normal file
View file

@ -0,0 +1,48 @@
{ pkgs, ... }:
let
alacritty-cfg = theme:
(pkgs.formats.toml {}).generate "alacritty.toml" {
bell = {
animation = "EaseOut";
duration = 100;
color = "#ff00ff";
};
font = {
normal = {
family = "DejaVu Sans Mono";
style = "Regular";
};
bold = {
family = "DejaVu Sans Mono";
style = "Bold";
};
italic = {
family = "DejaVu Sans Mono";
style = "Italic";
};
bold_italic = {
family = "DejaVu Sans Mono";
style = "Bold Italic";
};
size = 7.2;
};
};
in
{
environment.variables.TERMINAL = "alacritty";
environment.etc."alacritty/default.toml".source = alacritty-cfg {
};
nixpkgs.overlays = [(self: super: {
alacritty-panda = pkgs.symlinkJoin {
name = "alacritty";
paths = [
(pkgs.writers.writeDashBin "alacritty" ''
exec ${pkgs.alacritty}/bin/alacritty --config-file /etc/alacritty/default.toml "$@"
'')
pkgs.alacritty
];
};
})];
}

View file

@ -8,6 +8,7 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./configs/alacritty.nix
];
# Bootloader.
@ -98,6 +99,7 @@
extraGroups = [ "networkmanager" "wheel" ];
hashedPassword = "$y$j9T$jMcwkvhwodQHQRJ5c9Wg0/$YoLkfK3Frk9P5bXFneElJOTi2i8166RPzZEZ9hjamw8";
packages = with pkgs; [
alacritty-panda # use alacritty wrapper defined in configs/alacritty.nix
kdePackages.kate
thunderbird
cmatrix
@ -140,7 +142,7 @@
];
packages = [
# pkgs.alacritty-panda # use alacritty wrapper defined in configs/alacritty.nix
pkgs.alacritty-panda # use alacritty wrapper defined in configs/alacritty.nix
pkgs.brave
pkgs.firefox
pkgs.firefox-devedition