62 lines
1.3 KiB
Nix
62 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
pkgs,
|
|
config,
|
|
...
|
|
}:
|
|
with lib;
|
|
let
|
|
cfg = config.eboskma.fonts;
|
|
|
|
iosevka-aile = pkgs.iosevka-bin.override { variant = "Aile"; };
|
|
in
|
|
{
|
|
options.eboskma.fonts = {
|
|
enable = mkEnableOption "activate fonts";
|
|
iosevka-aile = mkOption {
|
|
description = "Install Iosevka Aile";
|
|
type = types.bool;
|
|
default = true;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
fonts = {
|
|
fontDir.enable = true;
|
|
|
|
packages =
|
|
with pkgs;
|
|
[
|
|
(nerdfonts.override {
|
|
fonts = [
|
|
"Iosevka"
|
|
"Meslo"
|
|
"Monaspace"
|
|
"Noto"
|
|
"Recursive"
|
|
];
|
|
})
|
|
corefonts
|
|
dejavu_fonts
|
|
google-fonts
|
|
kochi-substitute
|
|
material-icons
|
|
monaspace
|
|
noto-fonts-emoji
|
|
recursive
|
|
ttf_bitstream_vera
|
|
twitter-color-emoji
|
|
]
|
|
++ lib.optional cfg.iosevka-aile iosevka-aile;
|
|
|
|
fontconfig = {
|
|
defaultFonts = {
|
|
serif = [ "Recursive Sans Casual Static Medium" ];
|
|
sansSerif = [ (if cfg.iosevka-aile then "Iosevka Aile" else "DejaVu Sans") ];
|
|
monospace = [ "Iosevka Nerd Font" ];
|
|
emoji = [ "Twitter Color Emoji" ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|