Fix the icons for exa in kitty
- Package and install nerdfonts' icons so that we can use them
- Reduce the powerline glyphs to only what we need
diff --git a/modules/fonts.nix b/modules/fonts.nix
index 3716c96..14c51bd 100644
--- a/modules/fonts.nix
+++ b/modules/fonts.nix
@@ -8,6 +8,7 @@
font-awesome
material-design-icons
powerline-symbols
+ nerdfonts-glyphs
];
fontDir.enable = true;
@@ -15,8 +16,8 @@
fontconfig.defaultFonts = {
serif = ["Roboto Slab"];
- sansSerif = ["Roboto"];
- monospace = ["Roboto Mono"];
+ sansSerif = ["Roboto" "Symbols Nerd Font"];
+ monospace = ["Roboto Mono" "Symbols Nerd Font"];
emoji = ["Twitter Color Emoji"];
};
};
diff --git a/modules/kitty.nix b/modules/kitty.nix
index 3639d83..933885e 100644
--- a/modules/kitty.nix
+++ b/modules/kitty.nix
@@ -8,7 +8,7 @@
settings = {
enable_audio_bell = "no";
visual_bell_duration = "0.1";
- symbol_map = "U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols";
+ symbol_map = "U+E0A0-U+E0A3 PowerlineSymbols";
disable_ligatures = "cursor";
};
};
diff --git a/packages/nerdfonts-glyphs.nix b/packages/nerdfonts-glyphs.nix
new file mode 100644
index 0000000..ec96f74
--- /dev/null
+++ b/packages/nerdfonts-glyphs.nix
@@ -0,0 +1,36 @@
+{
+ lib,
+ fetchFromGitHub,
+ stdenv
+}:
+stdenv.mkDerivation rec {
+ pname = "nerdfonts-glyphs";
+ version = "2.2.2";
+
+ # This uses a sparse checkout because the repo is >2GB without it
+ src = fetchFromGitHub {
+ owner = "ryanoasis";
+ repo = "nerd-fonts";
+ rev = "v${version}";
+ sparseCheckout = ''
+ /src/glyphs
+ '';
+ sha256 = "sha256-ePBlEVjzAJ7g6iAGIqPfgZ8bwtNILmyEVm0zD+xNN6k=";
+ };
+
+ dontBuild = true;
+
+ installPhase = ''
+ mkdir -p $out/bin $out/share/fonts/truetype
+ mkdir -p $out/bin $out/share/fonts/opentype
+ find . -name "*.ttf" -exec mv {} $out/share/fonts/truetype \;
+ find . -name "*.otf" -exec mv {} $out/share/fonts/opentype \;
+ '';
+
+ meta = with lib; {
+ description = "A nerd-fonts copy that only includes the glyphs (rather than patching)";
+ homepage = "https://nerdfonts.com/";
+ license = licenses.free;
+ maintainers = with maintainers; [minion3665];
+ };
+}