nixos-config/configurations/profile/os/fonts.nix

25 lines
991 B
Nix
Raw Normal View History

{ config, pkgs, lib, materusArg, ... }:
2023-10-08 11:42:08 +02:00
let
packages = config.materus.profile.packages;
cfg = config.materus.profile.fonts;
in
{
options.materus.profile.fonts.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus font settings for OS";
2023-10-08 11:42:08 +02:00
config = lib.mkIf cfg.enable {
fonts.packages = packages.list.fonts ++ packages.list.moreFonts;
fonts.enableDefaultPackages = lib.mkDefault true;
2024-03-11 16:19:31 +01:00
2024-03-17 10:25:09 +01:00
fonts.fontconfig.enable = lib.mkDefault true;
fonts.fontconfig.cache32Bit = lib.mkDefault true;
2023-10-08 11:42:08 +02:00
2024-03-11 16:19:31 +01:00
fonts.fontconfig.defaultFonts.sansSerif = [ "Noto Sans" "DejaVu Sans" "WenQuanYi Zen Hei" "Noto Color Emoji" ];
fonts.fontconfig.defaultFonts.serif = [ "Noto Serif" "DejaVu Serif" "WenQuanYi Zen Hei" "Noto Color Emoji" ];
fonts.fontconfig.defaultFonts.emoji = [ "Noto Color Emoji" "OpenMoji Color" ];
2024-04-01 19:13:49 +02:00
fonts.fontconfig.defaultFonts.monospace = [ "Hack Nerd Font" "Noto Sans Mono" "WenQuanYi Zen Hei Mono" ];
2023-10-08 11:42:08 +02:00
2024-03-17 10:25:09 +01:00
fonts.fontDir.enable = lib.mkDefault true;
2023-10-08 11:42:08 +02:00
};
}