This commit is contained in:
biscuit
2025-05-21 00:55:15 -05:00
parent a11926ee85
commit ca5b15b377
4 changed files with 84 additions and 65 deletions
+43 -40
View File
@@ -1,50 +1,53 @@
{
description =
"A flake giving access to fonts that I use, outside of nixpkgs.";
description = "A flake giving access to fonts that I use, outside of nixpkgs.";
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.4";
paths = builtins.attrValues
self.packages.${system}; # Add font derivation names here
};
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
};
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.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 = ''
runHook preInstall
install -Dm644 $src/*.ttf -t $out/share/fonts/opentype
runHook postInstall
'';
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."; };
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.";};
};
});
}
Generated
+36 -22
View File
@@ -47,11 +47,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@@ -80,23 +80,6 @@
"type": "github"
}
},
"monolisa": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"path": "./custom/unlisted-fonts/",
"type": "path"
},
"original": {
"path": "./custom/unlisted-fonts/",
"type": "path"
},
"parent": []
},
"nixpkgs": {
"locked": {
"lastModified": 1747542820,
@@ -113,12 +96,28 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1747744144,
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"ags": "ags",
"home-manager": "home-manager",
"monolisa": "monolisa",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"unlisted-fonts": "unlisted-fonts"
}
},
"systems": {
@@ -135,6 +134,21 @@
"repo": "default",
"type": "github"
}
},
"unlisted-fonts": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"path": "./custom/unlisted-fonts/",
"type": "path"
},
"original": {
"path": "./custom/unlisted-fonts/",
"type": "path"
},
"parent": []
}
},
"root": "root",
+3 -2
View File
@@ -9,14 +9,15 @@
ags.url = "github:aylur/ags";
ags.inputs.nixpkgs.follows = "nixpkgs";
monolisa.url = "path:./custom/unlisted-fonts/";
monolisa.inputs.nixpkgs.follows = "nixpkgs";
unlisted-fonts.url = "path:./custom/unlisted-fonts/";
# monolisa.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
nixpkgs,
home-manager,
unlisted-fonts,
...
} @ inputs: let
info = import ./info.nix;
+2 -1
View File
@@ -4,9 +4,10 @@
system,
...
}: {
# imports = [ inputs.unlisted-fonts.packages.${system}.default ];
environment.systemPackages = with pkgs; [
# inputs.monolisa.packages.${system}.monolisa-font
inputs.monolisa.packages.${system}.gillsans
inputs.unlisted-fonts.packages.${system}.gillsans
];
fonts.packages = with pkgs; [
nerd-fonts.fira-code