diff options
| author | seth <[email protected]> | 2023-02-18 05:13:27 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-02-18 05:13:27 -0500 |
| commit | 1d7b04a71c7222153ffa9cd48f73b51ea72204d1 (patch) | |
| tree | 3d794209be0e2311dc76337c09c2cb39c52f6afb /hosts/common/fonts.nix | |
| parent | 8a8059d9889afcbcd8a133b0b186e3a97ce7ac23 (diff) | |
major refactor
- `mkHost` now accepts an optional `specialArgs` argument to be passed to
`nixosSystem()`
- the `modules` argument for `mkHMUser` is now optional
Diffstat (limited to 'hosts/common/fonts.nix')
| -rw-r--r-- | hosts/common/fonts.nix | 50 |
1 files changed, 24 insertions, 26 deletions
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 {}; }; } |
