{ config, lib, pkgs, ... }: with lib; let cfg = config.system.custom.fonts; in { options.system.custom.fonts = { enable = mkEnableOption "enable fonts"; dpi = mkOption { type = types.int; default = 141; description = '' dpi of the monitor ''; }; }; # You can put your private ttf fonts into # in $XDG_DATA_HOME/fonts, which for most users will resolve to ~/.local/share/fonts # see https://nixos.wiki/wiki/Fonts config = mkIf cfg.enable { fonts = { enableDefaultFonts = true; enableGhostscriptFonts = true; fontDir.enable = true; fontconfig = { dpi = cfg.dpi; subpixel = { lcdfilter = "default"; rgba = "rgb"; }; hinting = { enable = true; autohint = false; }; enable = true; antialias = true; #defaultFonts = { monospace = [ "inconsolata" ]; }; }; fonts = with pkgs; [ corefonts hasklig inconsolata source-code-pro symbola ubuntu_font_family # symbol fonts # ------------ # nerdfonts powerline-fonts font-awesome-ttf fira-code-symbols # shell font # ---------- terminus_font gohufont ]; }; }; }