nixos-config/modules/desktop/fonts.nix

44 lines
1.5 KiB
Nix
Raw Normal View History

2020-08-06 15:35:49 +00:00
# My selection of fonts for this setup.
{ config, options, lib, pkgs, ... }:
2020-10-25 15:49:14 +00:00
with lib; {
2020-08-06 15:35:49 +00:00
options.modules.desktop.fonts = {
enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf config.modules.desktop.fonts.enable {
2020-08-16 08:33:44 +00:00
# Enable fontconfig to easily discover fonts installed from home-manager.
fonts = {
2020-10-20 15:56:10 +00:00
fontDir.enable = true;
enableDefaultFonts = true;
fontconfig = {
enable = true;
defaultFonts = {
2020-10-25 15:49:14 +00:00
sansSerif = [ "Source Sans Pro" "IBM Plex Sans" "Noto Sans" ];
serif = [ "Source Serif Pro" "IBM Plex Serif" "Noto Serif" ];
monospace = [ "Source Code Pro" "IBM Plex Mono" "Noto Mono" ];
};
};
2020-08-16 08:33:44 +00:00
fonts = with pkgs; [
2020-10-25 15:49:14 +00:00
dejavu_fonts # Makes you feel like you've seen them before.
fira-code # The programming font with fancy symbols.
ibm-plex # IBM's face, is it professional?
iosevka # The fancy monofont with fancy ligatures.
jetbrains-mono # Jet to the face, land on the brains.
latinmodern-math # The ol' mathematical typeface.
nerdfonts # Fonts for NEEEEEEEEEEEEEEEEEEEEEEEEERDS!
noto-fonts # It's all about family and that's what so powerful about it.
noto-fonts-cjk # I don't condone anime.
source-code-pro # The Adobe pro code.
source-serif-pro # The Adobe serif code.
source-sans-pro # The above descriptions doesn't make much sense.
stix-otf # The font you need for them math moonrunes.
2020-08-16 08:33:44 +00:00
];
};
2020-08-06 15:35:49 +00:00
};
}