From 630250b3efbd790c745ba849e2bc8abb8fc58176 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 7 Nov 2020 11:19:41 +0100 Subject: [PATCH] home: Add alacritty --- users/simon/base.nix | 4 ++ users/simon/modules/alacritty.nix | 75 +++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 users/simon/modules/alacritty.nix diff --git a/users/simon/base.nix b/users/simon/base.nix index 343aed3..478ffac 100644 --- a/users/simon/base.nix +++ b/users/simon/base.nix @@ -29,6 +29,10 @@ in home-manager.useGlobalPkgs = true; home-manager.users.simon = { pkgs, ... }: { + imports = [ + ./modules/alacritty.nix + ]; + gtk = { enable = true; font.name = "sans-serif 10"; diff --git a/users/simon/modules/alacritty.nix b/users/simon/modules/alacritty.nix new file mode 100644 index 0000000..d87ca6b --- /dev/null +++ b/users/simon/modules/alacritty.nix @@ -0,0 +1,75 @@ +let + colorschemes = { + # https://github.com/alacritty/alacritty/wiki/Color-schemes#solarized + solarized-dark = { + # Default colors + primary = { + background = "#002b36"; # base03 + foreground = "#839496"; # base0 + }; + + # Cursor colors + cursor = { + text = "#002b36"; # base03 + cursor = "#839496"; # base0 + }; + + # Normal colors + normal = { + black = "#073642"; # base02 + red = "#dc322f"; # red + green = "#859900"; # green + yellow = "#b58900"; # yellow + blue = "#268bd2"; # blue + magenta = "#d33682"; # magenta + cyan = "#2aa198"; # cyan + white = "#eee8d5"; # base2 + }; + + # Bright colors + bright = { + black = "#002b36"; # base03 + red = "#cb4b16"; # orange + green = "#586e75"; # base01 + yellow = "#657b83"; # base00 + blue = "#839496"; # base0 + magenta = "#6c71c4"; # violet + cyan = "#93a1a1"; # base1 + white = "#fdf6e3"; # base3 + }; + }; + }; +in +{ + programs.alacritty = { + enable = true; + 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; + }; + }; +}