From f3c08b843199b64cc232dcbf508d6640a89ce671 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Tue, 14 Jan 2025 13:55:17 +0100 Subject: [PATCH] treewide: config/nixos/programs/fonts -> modules/nix/core/fonts --- config/nixos/default.nix | 1 - config/nixos/programs/default.nix | 5 ----- config/nixos/programs/fonts.nix | 24 ------------------------ modules/nix/core/default.nix | 1 + modules/nix/core/fonts.nix | 31 +++++++++++++++++++++++++++++++ 5 files changed, 32 insertions(+), 30 deletions(-) delete mode 100644 config/nixos/programs/fonts.nix create mode 100644 modules/nix/core/fonts.nix diff --git a/config/nixos/default.nix b/config/nixos/default.nix index a5aa301..f35bfde 100644 --- a/config/nixos/default.nix +++ b/config/nixos/default.nix @@ -1,6 +1,5 @@ { imports = [ - ./programs ./services ]; } diff --git a/config/nixos/programs/default.nix b/config/nixos/programs/default.nix index 2b547d6..e69de29 100644 --- a/config/nixos/programs/default.nix +++ b/config/nixos/programs/default.nix @@ -1,5 +0,0 @@ -{ - imports = [ - ./fonts.nix - ]; -} diff --git a/config/nixos/programs/fonts.nix b/config/nixos/programs/fonts.nix deleted file mode 100644 index 7136175..0000000 --- a/config/nixos/programs/fonts.nix +++ /dev/null @@ -1,24 +0,0 @@ -{pkgs, ...}: { - fonts = { - enableDefaultPackages = false; - packages = [ - pkgs.noto-fonts - pkgs.noto-fonts-cjk-sans - pkgs.noto-fonts-extra - pkgs.intel-one-mono - pkgs.noto-fonts-color-emoji - pkgs.nerd-fonts._0xproto - pkgs.nerd-fonts.symbols-only - ]; - - fontconfig = { - enable = true; - defaultFonts = { - serif = ["Noto Serif"]; - sansSerif = ["Inter Medium"]; - monospace = ["0xProto Nerd Font"]; - emoji = ["Noto Color Emoji"]; - }; - }; - }; -} diff --git a/modules/nix/core/default.nix b/modules/nix/core/default.nix index 7c020c6..1930a98 100644 --- a/modules/nix/core/default.nix +++ b/modules/nix/core/default.nix @@ -3,6 +3,7 @@ ./hardware ./boot.nix + ./fonts.nix ./home-manager.nix ./locales.nix ./networking.nix diff --git a/modules/nix/core/fonts.nix b/modules/nix/core/fonts.nix new file mode 100644 index 0000000..5154644 --- /dev/null +++ b/modules/nix/core/fonts.nix @@ -0,0 +1,31 @@ +{ + lib, + pkgs, + config, + ... +}: { + config = lib.mkIf config.local.profiles.desktop.enable { + fonts = { + enableDefaultPackages = false; + packages = [ + pkgs.noto-fonts + pkgs.noto-fonts-cjk-sans + pkgs.noto-fonts-extra + pkgs.intel-one-mono + pkgs.noto-fonts-color-emoji + pkgs.nerd-fonts._0xproto + pkgs.nerd-fonts.symbols-only + ]; + + fontconfig = { + enable = true; + defaultFonts = { + serif = ["Noto Serif"]; + sansSerif = ["Inter Medium"]; + monospace = ["0xProto Nerd Font"]; + emoji = ["Noto Color Emoji"]; + }; + }; + }; + }; +}