From a11926ee8553c8561362d69488ce62f9626c101b Mon Sep 17 00:00:00 2001 From: biscuit Date: Wed, 21 May 2025 00:25:39 -0500 Subject: [PATCH] upd --- custom/unlisted-fonts/flake.lock | 4 +- custom/unlisted-fonts/flake.nix | 77 ++++++++++++++++++-------------- custom/unlisted-fonts/result | 2 +- system/font.nix | 3 +- 4 files changed, 49 insertions(+), 37 deletions(-) diff --git a/custom/unlisted-fonts/flake.lock b/custom/unlisted-fonts/flake.lock index 1c513ae..3a4baec 100644 --- a/custom/unlisted-fonts/flake.lock +++ b/custom/unlisted-fonts/flake.lock @@ -22,13 +22,13 @@ "locked": { "lastModified": 1747744144, "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", - "owner": "NixOS", + "owner": "nixos", "repo": "nixpkgs", "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" diff --git a/custom/unlisted-fonts/flake.nix b/custom/unlisted-fonts/flake.nix index 12eead6..4ce25c1 100644 --- a/custom/unlisted-fonts/flake.nix +++ b/custom/unlisted-fonts/flake.nix @@ -1,39 +1,50 @@ { - description = "A flake that gives access to the Monolisa font."; + description = + "A flake giving access to fonts that I use, outside of nixpkgs."; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - flake-utils.url = "github:numtide/flake-utils"; - }; + 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 { - packages.monolisa-font = pkgs.stdenvNoCC.mkDerivation { - pname = "monolisa-font"; - version = "0.1"; - - # Use a relative path to the actual font folder - src = ./fonts/Monolisa; - - dontUnpack = true; - buildPhase = "true"; # no-op - - installPhase = '' - install -m444 -Dt $out/share/fonts/opentype $src/*.ttf - ''; - - meta = { - description = "Monolisa font package"; - # license = pkgs.lib.licenses.unfree; # change if needed + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { + defaultPackage = pkgs.symlinkJoin { + name = "myfonts-0.1.4"; + paths = builtins.attrValues + self.packages.${system}; # Add font derivation names here }; - }; - defaultPackage = self.packages.${system}.monolisa-font; - }); + packages.gillsans = pkgs.stdenvNoCC.mkDerivation { + name = "gillsans-font"; + dontConfigue = true; + src = pkgs.fetchzip { + url = + "https://freefontsvault.s3.amazonaws.com/2020/02/Gill-Sans-Font-Family.zip"; + sha256 = "sha256-YcZUKzRskiqmEqVcbK/XL6ypsNMbY49qJYFG3yZVF78="; + stripRoot = false; + }; + installPhase = '' + mkdir -p $out/share/fonts + cp -R $src $out/share/fonts/opentype/ + ''; + meta = { description = "A Gill Sans Font Family derivation."; }; + }; + + packages.palatino = pkgs.stdenvNoCC.mkDerivation { + name = "palatino-font"; + dontConfigue = true; + src = pkgs.fetchzip { + url = + "https://www.dfonts.org/wp-content/uploads/fonts/Palatino.zip"; + sha256 = "sha256-FBA8Lj2yJzrBQnazylwUwsFGbCBp1MJ1mdgifaYches="; + stripRoot = false; + }; + installPhase = '' + mkdir -p $out/share/fonts + cp -R $src/Palatino $out/share/fonts/truetype/ + ''; + meta = { description = "The Palatino Font Family derivation."; }; + }; + }); } diff --git a/custom/unlisted-fonts/result b/custom/unlisted-fonts/result index 0506d46..0bd5178 120000 --- a/custom/unlisted-fonts/result +++ b/custom/unlisted-fonts/result @@ -1 +1 @@ -/nix/store/6yh7k2jhkqi7k1wmi7snci15bx3snlkx-monolisa-font-0.1 \ No newline at end of file +/nix/store/kyfhnn1j9hc3k3a695i3yhnasmj7wb00-myfonts-0.1.4 \ No newline at end of file diff --git a/system/font.nix b/system/font.nix index 36e114d..1fac8aa 100644 --- a/system/font.nix +++ b/system/font.nix @@ -5,7 +5,8 @@ ... }: { environment.systemPackages = with pkgs; [ - inputs.monolisa.packages.${system}.monolisa-font + # inputs.monolisa.packages.${system}.monolisa-font + inputs.monolisa.packages.${system}.gillsans ]; fonts.packages = with pkgs; [ nerd-fonts.fira-code