From c99d1f33a122841f98aa76c45df559328d7eb6f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Tue, 24 Sep 2019 23:16:08 +0200 Subject: [PATCH] feat: move to alacritty --- configs/alacritty.nix | 32 ++++++++++++++++++++++++++++++++ configs/default.nix | 3 ++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 configs/alacritty.nix diff --git a/configs/alacritty.nix b/configs/alacritty.nix new file mode 100644 index 0000000..aa10097 --- /dev/null +++ b/configs/alacritty.nix @@ -0,0 +1,32 @@ +{ pkgs, lib, config, ... }: +{ + niveum.applications.terminal = "alacritty"; + + environment.systemPackages = [ + pkgs.alacritty + pkgs.alacritty.terminfo + ]; + + home-manager.users.me.xdg.configFile."alacritty/alacritty.yml".text = + let + colourNames = [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ]; + colours = lib.getAttrs colourNames config.niveum.colours; + in builtins.toJSON { + colors = { + primary = { + inherit (config.niveum.colours) background foreground; + dim_foreground = config.niveum.colours.background; + }; + normal = lib.mapAttrs (_: colour: colour.dark) colours; + bright = lib.mapAttrs (_: colour: colour.bright) colours; + }; + font = { + normal.family = config.niveum.fonts.terminal.name; + size = config.niveum.fonts.terminal.size - 2; + }; + key_bindings = [ + { key = "Add"; mods = "Control"; action = "IncreaseFontSize"; } + { key = "Minus"; mods = "Control"; action = "DecreaseFontSize"; } + ]; + }; +} diff --git a/configs/default.nix b/configs/default.nix index d4e3260..69b9105 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -10,6 +10,7 @@ in } # + @@ -51,7 +52,7 @@ in - + #