From 1d7b04a71c7222153ffa9cd48f73b51ea72204d1 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 18 Feb 2023 05:13:27 -0500 Subject: major refactor - `mkHost` now accepts an optional `specialArgs` argument to be passed to `nixosSystem()` - the `modules` argument for `mkHMUser` is now optional --- hosts/common/fonts.nix | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) (limited to 'hosts/common/fonts.nix') diff --git a/hosts/common/fonts.nix b/hosts/common/fonts.nix index c49f99c..78993cf 100644 --- a/hosts/common/fonts.nix +++ b/hosts/common/fonts.nix @@ -1,34 +1,32 @@ { - config, pkgs, + desktop, ... }: let - guiFonts = - if config.sys.gui.enable - then - with pkgs; [ - noto-fonts - noto-fonts-extra - noto-fonts-emoji - noto-fonts-cjk-sans - fira-code - (nerdfonts.override {fonts = ["FiraCode"];}) - ] - else []; - - guiDefaultFonts = - if config.sys.gui.enable - then { - serif = ["Noto Serif"]; - sansSerif = ["Noto Sans"]; - emoji = ["Noto Color Emoji"]; - monospace = ["Fira Code"]; - } - else {}; + gui = desktop != ""; in { fonts = { - enableDefaultFonts = true; - fonts = guiFonts; - fontconfig.defaultFonts = guiDefaultFonts; + enableDefaultFonts = gui; + fonts = + if gui + then + with pkgs; [ + noto-fonts + noto-fonts-extra + noto-fonts-emoji + noto-fonts-cjk-sans + fira-code + (nerdfonts.override {fonts = ["FiraCode"];}) + ] + else []; + fontconfig.defaultFonts = + if gui + then { + serif = ["Noto Serif"]; + sansSerif = ["Noto Sans"]; + emoji = ["Noto Color Emoji"]; + monospace = ["Fira Code"]; + } + else {}; }; } -- cgit v1.2.3