From e8df479f123f683580d7a59070e79043c6260b9c Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Fri, 29 Nov 2024 11:14:23 +0000 Subject: [PATCH] Fonts module --- home-manager/machines/wsl/home.nix | 1 + home-manager/modules/programs/fonts.nix | 39 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 home-manager/modules/programs/fonts.nix diff --git a/home-manager/machines/wsl/home.nix b/home-manager/machines/wsl/home.nix index 2da173a..0c95f0c 100644 --- a/home-manager/machines/wsl/home.nix +++ b/home-manager/machines/wsl/home.nix @@ -27,6 +27,7 @@ ../../modules/programs/devel.nix ../../modules/programs/ssh.nix (import ../../modules/programs/emacs.nix { }) + ../../modules/programs/fonts.nix ]; home.username = "nathan"; home.homeDirectory = "/home/nathan/"; diff --git a/home-manager/modules/programs/fonts.nix b/home-manager/modules/programs/fonts.nix new file mode 100644 index 0000000..a66f54c --- /dev/null +++ b/home-manager/modules/programs/fonts.nix @@ -0,0 +1,39 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + fonts.fontconfig = { + enable = true; + defaultFonts = { + emoji = [ + "Noto Emoji" + "Noto Color Emoji" + ]; + monospace = [ "JetBrainsMono-NF-Regular" ]; + sansSerif = [ "Roboto" ]; + }; + }; + + home.packages = with pkgs; [ + # Font viewer + gnome-font-viewer + fontpreview + # Fonts + noto-fonts + noto-fonts-cjk-sans + noto-fonts-cjk-serif + noto-fonts-color-emoji + noto-fonts-monochrome-emoji + roboto + (nerdfonts.override { + fonts = [ + "ZedMono" + "JetBrainsMono" + ]; + }) + ]; +}