From f640e44fd5520de3f4af27c51081979df7e59ff7 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Sun, 1 Sep 2024 17:22:32 +0200 Subject: [PATCH] install my own fonts to the nix store --- .gitignore | 3 ++- packages/cullmann-fonts.nix | 20 ++++++++++++++++++++ share/common.nix | 6 +++--- 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 packages/cullmann-fonts.nix diff --git a/.gitignore b/.gitignore index 38938af..e8b50c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -*.secret \ No newline at end of file +/secret/ +*.secret diff --git a/packages/cullmann-fonts.nix b/packages/cullmann-fonts.nix new file mode 100644 index 0000000..0a2b86e --- /dev/null +++ b/packages/cullmann-fonts.nix @@ -0,0 +1,20 @@ +{ + stdenvNoCC, + lib, +}: +stdenvNoCC.mkDerivation { + pname = "cullmann-fonts"; + version = "1.0"; + src = /nix/data/nixos/secret/fonts; + + installPhase = '' + mkdir -p $out/share/fonts/truetype/ + cp -r $src/*.{ttf,otf} $out/share/fonts/truetype/ + ''; + + meta = with lib; { + description = "Cullmann's Fonts"; + homepage = "https://cullmann.io/"; + platforms = platforms.all; + }; +} diff --git a/share/common.nix b/share/common.nix index ac1399d..3acde56 100644 --- a/share/common.nix +++ b/share/common.nix @@ -1,6 +1,7 @@ { config, pkgs, ... }: let impermanence = builtins.fetchTarball "https://github.com/nix-community/impermanence/archive/master.tar.gz"; + cullmann-fonts = pkgs.callPackage "/nix/data/nixos/packages/cullmann-fonts.nix" {}; in { # @@ -411,9 +412,8 @@ in # system fonts packages = with pkgs; [ - # Inter & Merriweather as main fonts - inter - merriweather + # personal paid fonts + cullmann-fonts # font families with good unicode coverage as fallback noto-fonts