From 5921d567795c1cea515ec77fc2fe4cdd0f3fb7ae Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Sun, 22 Dec 2019 21:59:42 -0700 Subject: [PATCH] develop: add DejaVu Nerd Font --- pkgs/data/fonts/dejavu-nerdfont/default.nix | 21 +++++++++++++++++++++ profiles/develop/default.nix | 14 ++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/data/fonts/dejavu-nerdfont/default.nix diff --git a/pkgs/data/fonts/dejavu-nerdfont/default.nix b/pkgs/data/fonts/dejavu-nerdfont/default.nix new file mode 100644 index 0000000..240850c --- /dev/null +++ b/pkgs/data/fonts/dejavu-nerdfont/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchzip }: + +stdenv.mkDerivation rec { + name = "dejavu-sans-mono-nerdfonts-${version}"; + version = "2.0.0"; + + src = fetchzip { + url = "https://github.com/ryanoasis/nerd-fonts/releases/download/v${version}/DejaVuSansMono.zip"; + hash = "sha256-yMvKzt5CKpK1bThT25lqSyRvZRCFvo6HHbTj+ripdCo="; + stripRoot = false; + }; + buildCommand = '' + install --target $out/share/fonts/opentype -D $src/*Mono.ttf + ''; + + meta = with stdenv.lib; { + description = "Nerdfont version of DejaVu"; + homepage = https://github.com/ryanoasis/nerd-fonts; + license = licenses.mit; + }; +} diff --git a/profiles/develop/default.nix b/profiles/develop/default.nix index e49b2a1..1fa0e87 100644 --- a/profiles/develop/default.nix +++ b/profiles/develop/default.nix @@ -31,6 +31,20 @@ wget ]; + fonts = { + fonts = [ pkgs.dejaVuNerdFont ]; + fontconfig.defaultFonts.monospace = [ + "DejaVu Sans Mono Nerd Font Complete Mono" + ]; + }; + + nixpkgs.overlays = let + font = self: super: { + dejaVuNerdFont = super.callPackage ../../pkgs/data/fonts/dejavu-nerdfont {}; + }; + in + [ font ]; + documentation.dev.enable = true; programs.thefuck.enable = true;