diff --git a/nixos/packages/graphical/default.nix b/nixos/packages/graphical/default.nix index e135de3..c3e2bea 100755 --- a/nixos/packages/graphical/default.nix +++ b/nixos/packages/graphical/default.nix @@ -2,7 +2,6 @@ imports = [ ./display-server - ./fonts.nix ./gnome-keyring.nix ./graphical.nix ./polkit.nix diff --git a/nixos/packages/graphical/fonts.nix b/nixos/packages/graphical/fonts.nix deleted file mode 100755 index b694893..0000000 --- a/nixos/packages/graphical/fonts.nix +++ /dev/null @@ -1,47 +0,0 @@ -{pkgs, ...}: { - # Fonts - fonts = { - fontDir.enable = true; - packages = with pkgs; [ - ### Noto Fonts - noto-fonts - noto-fonts-cjk-sans - noto-fonts-cjk-serif - noto-fonts-emoji - - ### Source Han - source-han-sans - source-han-serif - source-han-mono - - ### CJK - #wqy_zenhei # weird font shape, noto sans cjk is a better alternative - #wqy_microhei - - ### Sans - inter - roboto - - ### Monospace - fira-code - jetbrains-mono - (nerdfonts.override { - fonts = [ - "FiraCode" - "JetBrainsMono" - "NerdFontsSymbolsOnly" - ]; - }) - ]; - fontconfig = { - cache32Bit = true; - defaultFonts = { - emoji = ["Noto Color Emoji"]; - serif = ["Noto Serif"]; - sansSerif = ["Inter" "Noto Sans"]; - monospace = ["JetBrainsMono Nerd Font" "JetBrains Mono" "FiraCode Nerd Font" "Fira Code" "Noto Sans Mono"]; - }; - }; - # fontconfig is too limited here, and appling it globally is **bad**, use Home Manager instead - }; -} diff --git a/users/guanranwang/home-manager/nixos/fonts.nix b/users/guanranwang/home-manager/nixos/fonts.nix new file mode 100644 index 0000000..912e48c --- /dev/null +++ b/users/guanranwang/home-manager/nixos/fonts.nix @@ -0,0 +1,29 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + ### Noto Fonts + noto-fonts + noto-fonts-cjk-sans + noto-fonts-cjk-serif + noto-fonts-emoji + + ### Source Han + source-han-sans + source-han-serif + source-han-mono + + ### Sans + inter + roboto + + ### Monospace + fira-code + jetbrains-mono + (nerdfonts.override { + fonts = [ + "FiraCode" + "JetBrainsMono" + "NerdFontsSymbolsOnly" + ]; + }) + ]; +} diff --git a/users/guanranwang/home-manager/nixos/presets/desktop.nix b/users/guanranwang/home-manager/nixos/presets/desktop.nix index 07270d5..829a98b 100644 --- a/users/guanranwang/home-manager/nixos/presets/desktop.nix +++ b/users/guanranwang/home-manager/nixos/presets/desktop.nix @@ -4,6 +4,7 @@ ../home.nix ../dotfiles.nix + ../fonts.nix ../i18n.nix ../sway.nix ../waybar.nix