Extract font configuration into a mixin

This commit is contained in:
Oliver Davies 2024-09-21 12:17:08 +01:00
parent 561a30cde6
commit 24e2edfb8e
2 changed files with 33 additions and 27 deletions

31
modules/mixins/fonts.nix Normal file
View file

@ -0,0 +1,31 @@
{ pkgs, ... }:
let
theme = import ../../lib/theme { inherit pkgs; };
in
{
fonts = {
fontconfig = {
enable = true;
defaultFonts = {
monospace = [ theme.fonts.monospace.name ];
};
};
packages =
with pkgs;
[
(nerdfonts.override {
fonts = [
"AnonymousPro"
"FiraCode"
"GeistMono"
"IntelOneMono"
"Iosevka"
"JetBrainsMono"
];
})
]
++ [ theme.fonts.monospace.package ];
};
}