mirror of
https://github.com/Lyndeno/apple-fonts.nix.git
synced 2026-10-13 10:54:27 +00:00
Nix flake to easily install Apple fonts from their website.
- Nix 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github/workflows | ||
| .hydra | ||
| .mergify.yml | ||
| flake.lock | ||
| flake.nix | ||
| fontPackage.nix | ||
| LICENSE | ||
| README.md | ||
San Francisco Fonts
Note
The fonts are sourced directly from Apple, via apple.com. Add this flake as a font package, then configure your programs to use it.
Tip
Packages are also provided that automatically patch the fonts with the nerd font patcher. This provides a font that includes the most common symbols, suitable for use in the terminal, statusbars, etc.
OVERLAY
An overlay is provided under overlays.default, allowing you to add the font packages to your own nixpkgs instance:
nixpkgs.overlays = [ apple-fonts.overlays.default ];
# Packages are then available as pkgs attributes:
# pkgs.sf-pro, pkgs.sf-mono-nerd, pkgs.ny, etc.
CONFIGURATION EXAMPLE
{
description = "Configuration Demonstration";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# San Francisco Fonts | Apple Fonts
inputs.apple-fonts.url= "github:Lyndeno/apple-fonts.nix";
outputs = { self, nixpkgs, apple-fonts.nix }: {
nixosConfigurations = {
# NOTE: change "host" to your system's hostname
host = nixpkgs.lib.nixosSystem {
modules = [
./configuration.nix
];
};
};
};
}
USAGE EXAMPLE
via stylix:
stylix.fonts = {
serif = {
package = inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd;
name = "SFProDisplay Nerd Font";
};
};
Important
Stylix needs to be enabled and imported as well. Leading to a full example looking more like:
{
description = "Configuration Demonstration";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# San Francisco Fonts | Apple Fonts
inputs.apple-fonts.url= "github:Lyndeno/apple-fonts.nix";
inputs.apple-fonts.inputs.nixpkgs.follows = "nixpkgs";
# Stylix
inputs.stylix.url = "github:danth/stylix";
inputs.stylix.inputs.nixpkgs.follows = "nixpkgs";
outputs = { self, nixpkgs, apple-fonts, stylix }: {
nixosConfigurations = {
# NOTE: change "host" to your system's hostname
host = nixpkgs.lib.nixosSystem {
modules = [
./configuration.nix
stylix.nixosModules.stylix
];
};
};
};
}