summaryrefslogtreecommitdiff
path: root/modules/nixos/desktop/fonts.nix
blob: a61015299207c0d57dd95b6d10102476b93d1262 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
  config,
  pkgs,
  lib,
  ...
}: let
  cfg = config.getchoo.desktop.fonts;
  inherit (lib) mkEnableOption mkIf;
in {
  options.getchoo.desktop.fonts.enable = mkEnableOption "enable default fonts";

  config = mkIf cfg.enable {
    fonts = {
      enableDefaultPackages = true;

      packages = with pkgs; [
        corefonts
        fira-code
        (nerdfonts.override {fonts = ["FiraCode"];})
        noto-fonts
        noto-fonts-extra
        noto-fonts-emoji
        noto-fonts-cjk-sans
      ];

      fontconfig = {
        enable = true;
        defaultFonts = {
          serif = ["Noto Serif"];
          sansSerif = ["Noto Sans"];
          emoji = ["Noto Color Emoji"];
          monospace = ["Fira Code"];
        };
      };
    };
  };
}