nixos-config/users/simon/modules/alacritty.nix

80 lines
1.7 KiB
Nix
Raw Normal View History

{ nixosConfig, ... }:
2020-11-07 11:19:41 +01:00
let
2020-11-07 11:27:41 +01:00
common = import ./common.nix;
solarized = common.colorschemes.solarized;
2020-11-07 11:19:41 +01:00
colorschemes = {
# https://github.com/alacritty/alacritty/wiki/Color-schemes#solarized
solarized-dark = {
# Default colors
primary = {
2020-11-07 11:27:41 +01:00
background = solarized.base03;
foreground = solarized.base0;
2020-11-07 11:19:41 +01:00
};
# Cursor colors
cursor = {
2020-11-07 11:27:41 +01:00
text = solarized.base03;
cursor = solarized.base0;
2020-11-07 11:19:41 +01:00
};
# Normal colors
normal = {
2020-11-07 11:27:41 +01:00
black = solarized.base02;
red = solarized.red;
green = solarized.green;
yellow = solarized.yellow;
blue = solarized.blue;
magenta = solarized.magenta;
cyan = solarized.cyan;
white = solarized.base2;
2020-11-07 11:19:41 +01:00
};
# Bright colors
bright = {
2020-11-07 11:27:41 +01:00
black = solarized.base03;
red = solarized.orange;
green = solarized.base01;
yellow = solarized.base00;
blue = solarized.base0;
magenta = solarized.violet;
cyan = solarized.base1;
white = solarized.base3;
2020-11-07 11:19:41 +01:00
};
};
};
in
{
programs.alacritty = {
enable = nixosConfig.sbruder.gui.enable;
2020-11-07 11:19:41 +01:00
settings = {
font = {
normal = {
family = "Iosevka Nerd Font";
style = "Regular";
};
size = 13.5;
};
mouse.hide_when_typing = true;
key_bindings = [
{
key = "V";
mods = "Control|Alt";
action = "Paste";
}
{
key = "C";
mods = "Control|Alt";
action = "Copy";
}
];
bell.duration = 100;
colors = colorschemes.solarized-dark;
};
};
}