1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/configs/alacritty.nix

46 lines
1.1 KiB
Nix
Raw Normal View History

2019-09-24 23:16:08 +02:00
{ pkgs, lib, config, ... }:
2020-05-31 18:23:08 +02:00
let
2020-06-10 17:37:25 +02:00
colourNames =
[ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ];
2020-05-31 18:23:08 +02:00
colours = lib.getAttrs colourNames config.niveum.colours;
alacrittyConfig = {
2020-04-13 10:53:47 +02:00
background_opacity = 0.9;
2019-09-24 23:16:08 +02:00
colors = {
2020-06-10 17:37:25 +02:00
primary = { inherit (config.niveum.colours) background foreground; };
2019-09-24 23:16:08 +02:00
normal = lib.mapAttrs (_: colour: colour.dark) colours;
bright = lib.mapAttrs (_: colour: colour.bright) colours;
};
font = {
2019-09-25 10:10:36 +02:00
normal.family = "Monospace";
size = config.niveum.fonts.size - 2;
2019-09-24 23:16:08 +02:00
};
key_bindings = [
2020-06-10 17:37:25 +02:00
{
key = "Add";
mods = "Control";
action = "IncreaseFontSize";
}
{
key = "Minus";
mods = "Control";
action = "DecreaseFontSize";
}
{
key = "Key0";
mods = "Control";
action = "ResetFontSize";
}
2019-09-24 23:16:08 +02:00
];
};
2020-06-10 17:37:25 +02:00
in {
2020-05-31 18:23:08 +02:00
environment.variables.TERMINAL = "alacritty";
2020-10-16 08:23:27 +02:00
environment.systemPackages = [
pkgs.unstable.alacritty
2020-05-31 18:23:08 +02:00
];
home-manager.users.me.xdg.configFile = {
"alacritty/alacritty.yml".text = builtins.toJSON alacrittyConfig;
};
2019-09-24 23:16:08 +02:00
}