From b9119b20b19122b51196257b045a4db7b4d81a9f Mon Sep 17 00:00:00 2001 From: Malte Tammena Date: Thu, 11 Apr 2024 21:21:52 +0200 Subject: [PATCH] fix(*): replace ligatured hack with plain nerdfont hack font --- hashes.nix | 4 ---- hosts/helix-texta/default.nix | 4 ++-- hosts/murex-pecten/default.nix | 4 ++-- hosts/polymita-picta/default.nix | 4 ++-- hosts/trochulus-hispidus/default.nix | 2 +- modules/base-system.nix | 3 +-- pkgs/bemenu-configured.nix | 7 +++---- pkgs/hack.nix | 31 ---------------------------- users/malte/modules/kitty.nix | 4 ++-- users/malte/modules/mako.nix | 4 ++-- users/malte/modules/pass.nix | 2 +- users/malte/modules/shell.nix | 2 +- users/malte/modules/waybar.nix | 4 ++-- users/malte/modules/zathura.nix | 4 ++-- 14 files changed, 21 insertions(+), 58 deletions(-) delete mode 100644 pkgs/hack.nix diff --git a/hashes.nix b/hashes.nix index 6ac5854..43b869c 100644 --- a/hashes.nix +++ b/hashes.nix @@ -9,10 +9,6 @@ hash = "sha256-mdkRuEzfWhdbX0DD6uwc1o8kXjqk1Y0+FFKHrM2m81w="; cargoHash = "sha256-5nhtGqukZ8tp7gPV+JiUEHTzWUj6JtsB2i7bODcXJSc="; }; - hack = { - version = "v3.003+Nerdv2.1+FC3.1+JBMv2.242"; - hash = "sha256-nCOH+48w7nEm7mXXPCsDuaRlId2hNyYdV01IbVNWuME="; - }; pexel-bg.hash = "sha256-Su2UwFpZKj5sa80UrcDSX9O2GuVI6XR2gSLpp4gJZP0="; youtubePlugin = { hash = "sha256-gJ7RGB0pSG/iLdpmXHpQOoQTisXnMl1Mgd0KYFgg2qI="; diff --git a/hosts/helix-texta/default.nix b/hosts/helix-texta/default.nix index 2a19d9a..b2ebe6d 100644 --- a/hosts/helix-texta/default.nix +++ b/hosts/helix-texta/default.nix @@ -116,10 +116,10 @@ # Use some fonts fonts = { enableDefaultPackages = true; - packages = with pkgs; [hackNerdLigatures noto-fonts noto-fonts-cjk joypixels]; + packages = with pkgs; [hack-nerdfont noto-fonts noto-fonts-cjk joypixels]; fontconfig = { enable = true; - defaultFonts.monospace = ["Hack NF FC Ligatured"]; + defaultFonts.monospace = ["Hack Nerd Font Mono"]; }; }; diff --git a/hosts/murex-pecten/default.nix b/hosts/murex-pecten/default.nix index 99619b1..53d93bf 100644 --- a/hosts/murex-pecten/default.nix +++ b/hosts/murex-pecten/default.nix @@ -90,10 +90,10 @@ fonts = { enableDefaultPackages = true; - packages = with pkgs; [hackNerdLigatures noto-fonts noto-fonts-cjk joypixels]; + packages = with pkgs; [hack-nerdfont noto-fonts noto-fonts-cjk joypixels]; fontconfig = { enable = true; - defaultFonts.monospace = ["Hack NF FC Ligatured"]; + defaultFonts.monospace = ["Hack Nerd Font Mono"]; }; }; diff --git a/hosts/polymita-picta/default.nix b/hosts/polymita-picta/default.nix index de74ec2..0ee3ea6 100644 --- a/hosts/polymita-picta/default.nix +++ b/hosts/polymita-picta/default.nix @@ -58,10 +58,10 @@ # Use some fonts fonts = { enableDefaultPackages = true; - packages = with pkgs; [hackNerdLigatures noto-fonts noto-fonts-cjk joypixels]; + packages = with pkgs; [hack-nerdfont noto-fonts noto-fonts-cjk joypixels]; fontconfig = { enable = true; - defaultFonts.monospace = ["Hack NF FC Ligatured"]; + defaultFonts.monospace = ["Hack Nerd Font Mono"]; }; }; diff --git a/hosts/trochulus-hispidus/default.nix b/hosts/trochulus-hispidus/default.nix index 1db8f7b..51612a5 100644 --- a/hosts/trochulus-hispidus/default.nix +++ b/hosts/trochulus-hispidus/default.nix @@ -89,7 +89,7 @@ fonts = { enableDefaultPackages = true; - packages = with pkgs; [hackNerdLigatures noto-fonts noto-fonts-cjk joypixels]; + packages = with pkgs; [hack-nerdfont noto-fonts noto-fonts-cjk joypixels]; fontconfig = {enable = true;}; }; diff --git a/modules/base-system.nix b/modules/base-system.nix index 3afd0c6..f924ff1 100644 --- a/modules/base-system.nix +++ b/modules/base-system.nix @@ -45,9 +45,8 @@ in { (_: super: { "2i-emulator" = super.callPackage ../pkgs/2i-emulator.nix {}; boilr = super.callPackage ../pkgs/boilr.nix {}; - # Add fonts - hackNerdLigatures = super.callPackage ../pkgs/hack.nix {}; darkman = super.callPackage ../pkgs/darkman.nix {}; + hack-nerdfont = super.nerdfonts.override {fonts = ["Hack"];}; }) ]; # This includes the firmware, oc diff --git a/pkgs/bemenu-configured.nix b/pkgs/bemenu-configured.nix index 8604447..d996804 100644 --- a/pkgs/bemenu-configured.nix +++ b/pkgs/bemenu-configured.nix @@ -1,8 +1,7 @@ { writeShellApplication, bemenu, - hack-font, - hackNerdLigatures ? hack-font, + hack-nerdfont, # Color config color ? { base00 = "000000"; @@ -18,11 +17,11 @@ writeShellApplication { name = "bemenu-run-configured"; runtimeInputs = [ bemenu - hackNerdLigatures + hack-nerdfont ]; text = '' exec ${cmd} -inl80 \ - --fn 'Hack NF FC Ligatured 11' \ + --fn 'Hack Nerd Font Mono 11' \ --tb=#${color.base08} \ --tf=#${color.base00} \ --fb=#${color.base00} \ diff --git a/pkgs/hack.nix b/pkgs/hack.nix deleted file mode 100644 index ab44c7c..0000000 --- a/pkgs/hack.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - lib, - fetchzip, - stdenvNoCC, - ... -}: let - pname = "Ligatured-Hack"; - hashes = (builtins.import ../hashes.nix).hack; -in - stdenvNoCC.mkDerivation { - inherit pname; - inherit (hashes) version; - - src = fetchzip { - inherit (hashes) hash; - 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 = []; - }; - } diff --git a/users/malte/modules/kitty.nix b/users/malte/modules/kitty.nix index 666d53d..a8d46ef 100644 --- a/users/malte/modules/kitty.nix +++ b/users/malte/modules/kitty.nix @@ -15,8 +15,8 @@ in { enable = true; font = { - name = "Hack NF FC Ligatured"; - package = pkgs.hackNerdLigatures; + name = "Hack Nerd Font Mono"; + package = pkgs.hack-nerdfont; size = 9; }; diff --git a/users/malte/modules/mako.nix b/users/malte/modules/mako.nix index 82cc5bf..a9fe96f 100644 --- a/users/malte/modules/mako.nix +++ b/users/malte/modules/mako.nix @@ -9,7 +9,7 @@ in { services.mako = { enable = true; anchor = "top-right"; - font = "Hack NF FC Ligatured 11"; + font = "Hack Nerd Font Mono 11"; backgroundColor = colDark "base05"; textColor = colDark "base00"; borderColor = colDark "base00"; @@ -79,7 +79,7 @@ in { }; home.packages = [ - pkgs.hackNerdLigatures + pkgs.hack-nerdfont doNotDisturb ]; } diff --git a/users/malte/modules/pass.nix b/users/malte/modules/pass.nix index 5555db4..e916cae 100644 --- a/users/malte/modules/pass.nix +++ b/users/malte/modules/pass.nix @@ -49,5 +49,5 @@ in { # Install pass-ff extension required file: home.file.".mozilla/native-messaging-hosts/passff.json".source = "${pkgs.passff-host}/share/passff-host/passff.json"; - home.packages = [passmenu-bemenu pkgs.hackNerdLigatures]; + home.packages = [passmenu-bemenu pkgs.hack-nerdfont]; } diff --git a/users/malte/modules/shell.nix b/users/malte/modules/shell.nix index a018593..8bbf34f 100644 --- a/users/malte/modules/shell.nix +++ b/users/malte/modules/shell.nix @@ -72,7 +72,7 @@ in { functions = { to-image = '' - wl-paste | silicon -f 'Hack Nerd Font FC Ligatured' --pad-horiz 40 --pad-vert 50 --theme gruvbox --shadow-blur-radius 30 -b '#ebdbb2' --shadow-color '#282828' --no-window-controls --output /tmp/image.png $argv && wl-copy < /tmp/image.png + wl-paste | silicon -f 'Hack Nerd Font Mono' --pad-horiz 40 --pad-vert 50 --theme gruvbox --shadow-blur-radius 30 -b '#ebdbb2' --shadow-color '#282828' --no-window-controls --output /tmp/image.png $argv && wl-copy < /tmp/image.png ''; nonix = "sed 's:/nix/store/[^-]\\+-\\([^/ ]*\\):< \\1>:g'"; c = '' diff --git a/users/malte/modules/waybar.nix b/users/malte/modules/waybar.nix index fd65b77..5b4805d 100644 --- a/users/malte/modules/waybar.nix +++ b/users/malte/modules/waybar.nix @@ -69,7 +69,7 @@ fi ''; in { - home.packages = [pkgs.hackNerdLigatures]; + home.packages = [pkgs.hack-nerdfont]; programs.waybar = { enable = true; @@ -161,7 +161,7 @@ in { * { border: none; border-radius: 0; - font-family: Hack NF FC Ligatured; + font-family: Hack Nerd Font; font-size: 11px; min-height: 20px; } diff --git a/users/malte/modules/zathura.nix b/users/malte/modules/zathura.nix index 11c9575..13bb4b2 100644 --- a/users/malte/modules/zathura.nix +++ b/users/malte/modules/zathura.nix @@ -11,13 +11,13 @@ lightTheme = config.myLib.mkZathuraTheme config.colorsLight; darkTheme = config.myLib.mkZathuraTheme config.colorsDark; in { - home.packages = [pkgs.hackNerdLigatures]; + home.packages = [pkgs.hack-nerdfont]; programs.zathura = { enable = true; options = { selection-clipboard = "clipboard"; - font = "Hack NF FC Ligatured 9"; + font = "Hack Nerd Font Mono 9"; render-loading = "true"; recolor = "true"; recolor-keephue = "true";