From ac4fb1985ef90a5f9db2d30f985b59555c82274f Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Sun, 21 May 2023 17:12:46 +0200 Subject: [PATCH] Make Iosevka Aile optional due to resource-heavy compilation --- modules/fonts/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/fonts/default.nix b/modules/fonts/default.nix index 895ccec..dafffb7 100644 --- a/modules/fonts/default.nix +++ b/modules/fonts/default.nix @@ -89,7 +89,14 @@ with lib; let }; in { - options.eboskma.fonts = { enable = mkEnableOption "activate fonts"; }; + options.eboskma.fonts = { + enable = mkEnableOption "activate fonts"; + iosevka-aile = mkOption { + description = "Install Iosevka Aile"; + type = types.bool; + default = true; + }; + }; config = mkIf cfg.enable { fonts = { @@ -100,19 +107,18 @@ in corefonts dejavu_fonts google-fonts - iosevka-aile kochi-substitute material-icons 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 = [ "Iosevka Aile" ]; + sansSerif = [ (if cfg.iosevka-aile then "Iosevka Aile" else "DejaVu Sans") ]; monospace = [ "Iosevka Nerd Font" ]; emoji = [ "Twitter Color Emoji" ]; };