2022-04-27 00:21:19 +02:00
|
|
|
{ lib
|
|
|
|
, pkgs
|
|
|
|
, config
|
|
|
|
, ...
|
2022-03-01 22:19:03 +01:00
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.eboskma.fonts;
|
2023-01-13 10:30:49 +01:00
|
|
|
|
2023-07-04 20:31:40 +02:00
|
|
|
iosevka-buildplans = builtins.fromTOML (builtins.readFile "${pkgs.iosevka.src}/build-plans.toml");
|
2023-01-13 10:30:49 +01:00
|
|
|
iosevka-aile = pkgs.iosevka.override {
|
2023-07-04 20:31:40 +02:00
|
|
|
privateBuildPlan = iosevka-buildplans.buildPlans.iosevka-aile;
|
2023-01-13 10:30:49 +01:00
|
|
|
set = "aile";
|
|
|
|
};
|
2022-04-27 00:21:19 +02:00
|
|
|
in
|
|
|
|
{
|
2023-05-21 17:12:46 +02:00
|
|
|
options.eboskma.fonts = {
|
|
|
|
enable = mkEnableOption "activate fonts";
|
|
|
|
iosevka-aile = mkOption {
|
|
|
|
description = "Install Iosevka Aile";
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
};
|
2021-11-21 19:07:12 +01:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
fonts = {
|
|
|
|
fontDir.enable = true;
|
|
|
|
|
2023-07-31 11:58:06 +02:00
|
|
|
packages = with pkgs; [
|
2023-11-10 16:45:17 +01:00
|
|
|
(nerdfonts.override { fonts = [ "Iosevka" "Meslo" "Noto" ]; })
|
2023-01-13 10:30:49 +01:00
|
|
|
corefonts
|
2021-11-21 19:07:12 +01:00
|
|
|
dejavu_fonts
|
2021-11-22 18:56:59 +01:00
|
|
|
google-fonts
|
2021-11-21 19:07:12 +01:00
|
|
|
kochi-substitute
|
2021-12-06 09:58:39 +01:00
|
|
|
material-icons
|
2023-11-10 16:45:17 +01:00
|
|
|
monaspace
|
2021-11-21 19:07:12 +01:00
|
|
|
noto-fonts-emoji
|
|
|
|
ttf_bitstream_vera
|
2023-01-13 10:30:49 +01:00
|
|
|
twitter-color-emoji
|
2023-05-21 17:12:46 +02:00
|
|
|
] ++ lib.optional cfg.iosevka-aile iosevka-aile;
|
2021-11-21 19:07:12 +01:00
|
|
|
|
|
|
|
fontconfig = {
|
|
|
|
defaultFonts = {
|
2022-04-27 00:21:19 +02:00
|
|
|
serif = [ "Recursive Sans Casual Static Medium" ];
|
2023-05-21 17:12:46 +02:00
|
|
|
sansSerif = [ (if cfg.iosevka-aile then "Iosevka Aile" else "DejaVu Sans") ];
|
2022-04-27 00:21:19 +02:00
|
|
|
monospace = [ "Iosevka Nerd Font" ];
|
2023-01-13 10:30:49 +01:00
|
|
|
emoji = [ "Twitter Color Emoji" ];
|
2021-11-21 19:07:12 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|