This commit is contained in:
biscuit
2025-05-21 00:25:39 -05:00
parent f19b7ab674
commit a11926ee85
4 changed files with 49 additions and 37 deletions
+2 -2
View File
@@ -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"
+44 -33
View File
@@ -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."; };
};
});
}
+1 -1
View File
@@ -1 +1 @@
/nix/store/6yh7k2jhkqi7k1wmi7snci15bx3snlkx-monolisa-font-0.1
/nix/store/kyfhnn1j9hc3k3a695i3yhnasmj7wb00-myfonts-0.1.4
+2 -1
View File
@@ -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