-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterminal-emulators.nix
37 lines (32 loc) · 1.34 KB
/
terminal-emulators.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Author: Viacheslav Lotsmanov
# License: MIT https://raw.githubusercontent.com/unclechu/nixos-config/master/LICENSE
{ pkgs, lib }:
let
inherit (import ./constants.nix) wenzelUserName;
sources = import nix/sources.nix;
termite-config = pkgs.callPackage sources.termiterc {};
alacritty-config = pkgs.callPackage apps/alacritty {};
mkCustomFontTerminal = terminalConfig: defaultName: font:
let extract = lib.attrVals ["default" "dark" "light"]; in
extract terminalConfig ++
extract (terminalConfig.customize {
inherit defaultName font;
});
mkCustomFontTerminals = commandNameInfix: font:
mkCustomFontTerminal termite-config "termite-${commandNameInfix}-font" font
++ mkCustomFontTerminal alacritty-config "alacritty-${commandNameInfix}-font" font;
# All terminal emulators with all configs for them (different color schemes and fonts)
allTerminalEmulators = []
++ mkCustomFontTerminals "hack" "Hack"
++ mkCustomFontTerminals "ibm" "IBM Plex Mono"
++ mkCustomFontTerminals "iosevka" "IosevkaTerm Nerd Font"
++ mkCustomFontTerminals "jetbrains" "JetBrains Mono";
configuration = {
users.users.${wenzelUserName}.packages = allTerminalEmulators;
};
in
{
inherit configuration;
allTerminalEmulators =
builtins.listToAttrs (map (x: { name = lib.getName x; value = x; }) allTerminalEmulators);
}