nixos/system/home/alacritty/default.nix
Evie Litherland-Smith 5ff572a9b7 Major rewrite/refactor to simplify things
Move home/ directory under system/ directory. Remove duplicated
machine-specific config files, now handled as one per host (excluding
hardware-configuration directory)

Move as much configuration as possible out of flake.nix and into more
appropriate files (e.g. system/default.nix)

Add a desktop.nix and laptop.nix for system, both will import
home/desktop.nix and home/laptop.nix respectively to reduce
duplication in machine-specific config files

Remove games and streaming directories, moved directly into Vanguard
config file

Remove home/personal.nix since it ended up being empty after changes

Remove old sway config since I haven't been maintaining it and this
refactor will definitely break it
2024-08-30 12:57:02 +01:00

74 lines
1.9 KiB
Nix

{ config, fonts, ... }:
{
programs.alacritty = {
enable = true;
settings = {
font = {
size = fonts.sizes.applications;
normal = {
family = fonts.monospace.name;
style = "Regular";
};
};
window = {
dynamic_title = true;
padding = {
x = 5;
y = 5;
};
};
live_config_reload = true;
selection.save_to_clipboard = true;
mouse.hide_when_typing = true;
colors =
let
mapColours =
isBright:
(builtins.listToAttrs (
builtins.map
(col: {
# Alacritty uses Yellow instead of Orange for BASE09
name = if col == "orange" then "yellow" else col;
value = "0x${config.scheme.${if isBright then "bright-${col}" else col}}";
})
[
"red"
"orange"
"green"
"cyan"
"blue"
"magenta"
]
));
mapNamedColours = mapColours false;
mapNamedBrightColours = mapColours true;
in
{
draw_bold_text_with_bright_colors = false;
primary = with config.scheme; {
background = "0x${base00}";
foreground = "0x${base05}";
};
cursor = with config.scheme; {
cursor = "0x${base05}";
text = "0x${base00}";
};
normal =
with config.scheme;
{
black = "0x${base00-hex}";
white = "0x${base05-hex}";
}
// mapNamedColours;
bright =
with config.scheme;
{
black = "0x${base03-hex}";
white = "0x${base07-hex}";
}
// mapNamedBrightColours;
};
};
};
}