[user/malte] Add Hack font for kitty and use it

This commit is contained in:
Malte Tammena 2022-04-08 23:55:37 +02:00
parent 287468612e
commit 26d701b94f
3 changed files with 36 additions and 6 deletions

View file

@ -120,8 +120,9 @@
inputs.colmena.overlay
utils.overlay
(self: super: {
# Add FiraCode as a package, but use NerdFonts
# Add fonts
firaCodeNerd = super.nerdfonts.override {fonts = ["FiraCode"];};
hackNerdLigatures = super.callPackage ./pkgs/hack.nix {};
# Add the emulator
"2a-emulator" =
inputs.emulator-2a.packages.x86_64-linux."2a-emulator";

30
pkgs/hack.nix Normal file
View file

@ -0,0 +1,30 @@
{
lib,
fetchzip,
stdenvNoCC,
}: let
pname = "Ligatured-Hack";
version = "v3.003+Nerdv2.1+FC3.1+JBMv2.242";
sha256 = "nCOH+48w7nEm7mXXPCsDuaRlId2hNyYdV01IbVNWuME=";
in
stdenvNoCC.mkDerivation {
inherit pname version;
src = fetchzip {
inherit sha256;
url = "https://github.com/gaplo917/Ligatured-Hack/releases/download/v3.003%2BNv2.1.0%2BFC%2BJBMv2.242/HackLigatured-v3.003+FC3.1+JBMv2.242.zip";
stripRoot = false;
};
installPhase = ''
mkdir -p $out/share/fonts/truetype/${pname}
cp *.ttf $out/share/fonts/truetype/${pname}
'';
meta = with lib; {
description = "Automatically patch latest Hack Font with latest JetBrains Mono / FiraCode Ligatures";
homepage = "https://github.com/gaplo917/Ligatured-Hack";
license = licenses.gpl3;
maintainers = [];
};
}

View file

@ -3,19 +3,18 @@
enable = true;
font = {
name = "Fira Code Regular Nerd Font Complete";
package = pkgs.firaCodeNerd;
name = "Hack Nerd Font FC Ligatured";
package = pkgs.hackNerdLigatures;
size = 9;
};
settings = {
adjust_column_width = 1;
adjust_line_height = 1;
enable_audio_bell = "no";
touch_scroll_multiplier = "10.0";
#touch_scroll_multiplier = "10.0";
allow_remote_control = "yes";
bold_font = "Fira Code Bold Nerd Font Complete";
# https://github.com/gruvbox-community/gruvbox-contrib/blob/master/kitty/gruvbox-dark.conf
background = "#282828";
foreground = "#ebdbb2";