From ca5b15b377663432342dcf8f297fcd533fd11b52 Mon Sep 17 00:00:00 2001 From: biscuit Date: Wed, 21 May 2025 00:55:15 -0500 Subject: [PATCH] a --- custom/unlisted-fonts/flake.nix | 83 +++++++++++++++++---------------- flake.lock | 58 ++++++++++++++--------- flake.nix | 5 +- system/font.nix | 3 +- 4 files changed, 84 insertions(+), 65 deletions(-) diff --git a/custom/unlisted-fonts/flake.nix b/custom/unlisted-fonts/flake.nix index 4ce25c1..1198d2b 100644 --- a/custom/unlisted-fonts/flake.nix +++ b/custom/unlisted-fonts/flake.nix @@ -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.";}; + }; + }); } diff --git a/flake.lock b/flake.lock index ac431f4..0294f38 100644 --- a/flake.lock +++ b/flake.lock @@ -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", diff --git a/flake.nix b/flake.nix index f0b3f56..d9c364a 100644 --- a/flake.nix +++ b/flake.nix @@ -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; diff --git a/system/font.nix b/system/font.nix index 1fac8aa..3f80afe 100644 --- a/system/font.nix +++ b/system/font.nix @@ -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