From a9aef329848c2eb1bb65f5bf19b0145ecee6fbd3 Mon Sep 17 00:00:00 2001 From: biscuit Date: Tue, 20 May 2025 22:33:12 -0500 Subject: [PATCH] upd --- custom/unlisted-fonts.nix | 33 +++++++++++++++++++++++++++++++++ system/font.nix | 8 +++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 custom/unlisted-fonts.nix diff --git a/custom/unlisted-fonts.nix b/custom/unlisted-fonts.nix new file mode 100644 index 0000000..93a074c --- /dev/null +++ b/custom/unlisted-fonts.nix @@ -0,0 +1,33 @@ +{ + description = "A flake that gives access to custom fonts."; + + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { + self, + nixpkgs, + flake-utils, + }: + flake-utils.lib.eachDefaultSystem ( + system: let + pkgs = nixpkgs.legacyPackages.${system}; + in { + defaultPackage = pkgs.symlinkJoin { + name = "myfonts-0.1"; + paths = builtins.attrValues self.packages.${system}; + }; + + packages.monolisa = pkgs.stdenvNoCC.mkDerivation { + name = "monolisa-font"; + dontConfigure = true; + src = builtins.toPath ./fonts; + }; + installPhase = '' + mkdir -p $out/share/fonts/truetype + cp -R $src/moonolisa/*.ttf $out/share/fonts/truetype + ''; + meta = {description = "Monolisa font.";}; + } + ); +} diff --git a/system/font.nix b/system/font.nix index 18dd46d..968e4f2 100644 --- a/system/font.nix +++ b/system/font.nix @@ -1,4 +1,10 @@ -{pkgs, ...}: { +{ + pkgs, + inputs, + system, + ... +}: { + fonts.packages = with pkgs; [ nerd-fonts.fira-code nerd-fonts.jetbrains-mono