1{ lib, config, pkgs, ... }:
2
3with lib;
4let
5 cfg = config.modules.desktop;
6in {
7 options.modules.desktop.fonts = {
8 enable = mkOption {
9 default = cfg.enable;
10 example = true;
11 description = "Whether to enable default fonts.";
12 type = types.bool;
13 };
14 };
15
16 config = mkIf cfg.fonts.enable {
17 fonts = {
18 fontDir = {
19 enable = true;
20 decompressFonts = true;
21 };
22
23 packages = with pkgs; [
24 sf-pro
25 sf-mono
26 new-york
27 noto-fonts
28 noto-fonts-cjk-sans
29 noto-fonts-emoji
30 inter
31 ];
32
33 fontconfig.defaultFonts = {
34 serif = [ "New York" "Noto Serif" "Noto Color Emoji" ];
35 sansSerif = [ "SF Pro Display" "Inter" "Noto Color Emoji" ];
36 monospace = [ "Dank Mono" "SF Mono" "Noto Color Emoji" ];
37 emoji = [ "Noto Color Emoji" ];
38 };
39 };
40 };
41}