From a4aec077f7efa1c8b270f893f80330ff0f4f3f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Wed, 6 Jul 2022 22:28:42 +0100 Subject: [PATCH] simplify and fix font installation --- nixos/common.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/common.nix b/nixos/common.nix index e5b7312e..caddc0c9 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -66,16 +66,13 @@ }; fonts.fonts = with pkgs; [ - (fetchzip { - name = "berkeley-mono-fonts"; - url = "file:///" + ./fonts.zip; - postFetch = '' - mkdir -p $out/share/fonts - unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype - unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype - ''; - sha256 = "sha256-r4R7+GrdbksV+EtV68RlzTauTgBS3tzlqawgTMXyJW8="; - }) + (runCommand "berkeley-fonts" { } '' + mkdir -vp "$out/share/fonts/opentype" + mkdir -vp "$out/share/fonts/truetype" + ${pkgs.unzip}/bin/unzip ${./fonts.zip} \*.otf -d $out/share/fonts/opentype + ${pkgs.unzip}/bin/unzip ${./fonts.zip} \*.ttf -d $out/share/fonts/truetype + + '') emojione fira-code