From df62cf69acf4959c28f19e9bd42ab8cdfe4fa8ea Mon Sep 17 00:00:00 2001 From: alejandro-angulo Date: Sat, 3 Aug 2024 16:16:43 -0700 Subject: [PATCH] Added font config --- modules/home/fonts/default.nix | 31 ++++++++++++++++++++ modules/home/windowManagers/sway/default.nix | 1 + 2 files changed, 32 insertions(+) create mode 100644 modules/home/fonts/default.nix diff --git a/modules/home/fonts/default.nix b/modules/home/fonts/default.nix new file mode 100644 index 0000000..3a12509 --- /dev/null +++ b/modules/home/fonts/default.nix @@ -0,0 +1,31 @@ +{ + config, + lib, + pkgs, + namespace, + ... +}: let + cfg = config.${namespace}.fonts; +in { + options.${namespace}.fonts = { + enable = lib.mkEnableOption "font config"; + }; + + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + (nerdfonts.override {fonts = ["Hack"];}) + noto-fonts + noto-fonts-color-emoji + ]; + + fonts.fontconfig = { + enable = true; + defaultFonts = { + monospace = ["Hack Nerd Font"]; + emoji = ["Noto Color Emoji"]; + serif = ["Noto Serif"]; + sansSerif = ["Noto Sans"]; + }; + }; + }; +} diff --git a/modules/home/windowManagers/sway/default.nix b/modules/home/windowManagers/sway/default.nix index 738b22c..4cba2d3 100644 --- a/modules/home/windowManagers/sway/default.nix +++ b/modules/home/windowManagers/sway/default.nix @@ -39,6 +39,7 @@ in { config = mkIf cfg.enable { ${namespace} = { + fonts.enable = true; programs = { kitty.enable = true; rofi.enable = true;