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 = description = "A flake giving access to fonts that I use, outside of nixpkgs.";
"A flake giving access to fonts that I use, outside of nixpkgs.";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }: outputs = {
flake-utils.lib.eachDefaultSystem (system: self,
let pkgs = nixpkgs.legacyPackages.${system}; nixpkgs,
in { flake-utils,
defaultPackage = pkgs.symlinkJoin { }:
name = "myfonts-0.1.4"; flake-utils.lib.eachDefaultSystem (system: let
paths = builtins.attrValues pkgs = nixpkgs.legacyPackages.${system};
self.packages.${system}; # Add font derivation names here 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 { packages.gillsans = pkgs.stdenvNoCC.mkDerivation {
name = "gillsans-font"; name = "gillsans-font";
dontConfigue = true; dontConfigue = true;
src = pkgs.fetchzip { src = pkgs.fetchzip {
url = url = "https://freefontsvault.s3.amazonaws.com/2020/02/Gill-Sans-Font-Family.zip";
"https://freefontsvault.s3.amazonaws.com/2020/02/Gill-Sans-Font-Family.zip"; sha256 = "sha256-YcZUKzRskiqmEqVcbK/XL6ypsNMbY49qJYFG3yZVF78=";
sha256 = "sha256-YcZUKzRskiqmEqVcbK/XL6ypsNMbY49qJYFG3yZVF78="; stripRoot = false;
stripRoot = false;
};
installPhase = ''
mkdir -p $out/share/fonts
cp -R $src $out/share/fonts/opentype/
'';
meta = { description = "A Gill Sans Font Family derivation."; };
}; };
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 { packages.palatino = pkgs.stdenvNoCC.mkDerivation {
name = "palatino-font"; name = "palatino-font";
dontConfigue = true; dontConfigue = true;
src = pkgs.fetchzip { src = pkgs.fetchzip {
url = url = "https://www.dfonts.org/wp-content/uploads/fonts/Palatino.zip";
"https://www.dfonts.org/wp-content/uploads/fonts/Palatino.zip"; sha256 = "sha256-FBA8Lj2yJzrBQnazylwUwsFGbCBp1MJ1mdgifaYches=";
sha256 = "sha256-FBA8Lj2yJzrBQnazylwUwsFGbCBp1MJ1mdgifaYches="; stripRoot = false;
stripRoot = false;
};
installPhase = ''
mkdir -p $out/share/fonts
cp -R $src/Palatino $out/share/fonts/truetype/
'';
meta = { description = "The Palatino Font Family derivation."; };
}; };
}); 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" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1731533236,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -80,23 +80,6 @@
"type": "github" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1747542820, "lastModified": 1747542820,
@@ -113,12 +96,28 @@
"type": "github" "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": { "root": {
"inputs": { "inputs": {
"ags": "ags", "ags": "ags",
"home-manager": "home-manager", "home-manager": "home-manager",
"monolisa": "monolisa", "nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs" "unlisted-fonts": "unlisted-fonts"
} }
}, },
"systems": { "systems": {
@@ -135,6 +134,21 @@
"repo": "default", "repo": "default",
"type": "github" "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", "root": "root",
+3 -2
View File
@@ -9,14 +9,15 @@
ags.url = "github:aylur/ags"; ags.url = "github:aylur/ags";
ags.inputs.nixpkgs.follows = "nixpkgs"; ags.inputs.nixpkgs.follows = "nixpkgs";
monolisa.url = "path:./custom/unlisted-fonts/"; unlisted-fonts.url = "path:./custom/unlisted-fonts/";
monolisa.inputs.nixpkgs.follows = "nixpkgs"; # monolisa.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
unlisted-fonts,
... ...
} @ inputs: let } @ inputs: let
info = import ./info.nix; info = import ./info.nix;
+2 -1
View File
@@ -4,9 +4,10 @@
system, system,
... ...
}: { }: {
# imports = [ inputs.unlisted-fonts.packages.${system}.default ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# inputs.monolisa.packages.${system}.monolisa-font # inputs.monolisa.packages.${system}.monolisa-font
inputs.monolisa.packages.${system}.gillsans inputs.unlisted-fonts.packages.${system}.gillsans
]; ];
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
nerd-fonts.fira-code nerd-fonts.fira-code