nixos: move font packages to home-manager

This commit is contained in:
Guanran Wang 2023-11-04 20:49:54 +08:00
parent db3355ffee
commit 3ad8fc3963
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
4 changed files with 30 additions and 48 deletions

View file

@ -2,7 +2,6 @@
imports = [ imports = [
./display-server ./display-server
./fonts.nix
./gnome-keyring.nix ./gnome-keyring.nix
./graphical.nix ./graphical.nix
./polkit.nix ./polkit.nix

View file

@ -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
};
}

View file

@ -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"
];
})
];
}

View file

@ -4,6 +4,7 @@
../home.nix ../home.nix
../dotfiles.nix ../dotfiles.nix
../fonts.nix
../i18n.nix ../i18n.nix
../sway.nix ../sway.nix
../waybar.nix ../waybar.nix