Skip to content

Commit

Permalink
refactor(config): better way of installing nerd fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
zakuciael committed Jun 1, 2024
1 parent edbff8c commit ced25b6
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 13 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"ehci",
"Filesystems",
"flatpak",
"fontconfig",
"Hyprland",
"hyprpaper",
"insmod",
Expand Down
39 changes: 30 additions & 9 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,36 @@
services.xserver.xkb.layout = "pl";

# Fonts
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-extra
noto-fonts-color-emoji
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji-blob-bin
nerdfonts
];
fonts = {
packages = with pkgs; [
noto-fonts
noto-fonts-extra
noto-fonts-color-emoji
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji-blob-bin
jetbrains-mono
icomoon-feather
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
];
fontconfig = {
enable = true;
localConf = ''
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<alias>
<family>JetBrains Mono</family>
<prefer>
<family>JetBrains Mono</family>
<family>icomoon-feather</family>
<family>Symbols Nerd Font Mono</family>
</prefer>
</alias>
</fontconfig>
'';
};
};

# Global packages
environment = {
Expand Down
2 changes: 1 addition & 1 deletion dotfiles/rofi/launchers/fonts.rasi
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
**/

* {
font: "JetBrainsMono Nerd Font 10";
font: "JetBrains Mono 10";
}
2 changes: 1 addition & 1 deletion dotfiles/rofi/powermenu/fonts.rasi
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
**/

* {
font: "JetBrainsMono Nerd Font 10";
font: "JetBrains Mono 10";
}
2 changes: 1 addition & 1 deletion modules/desktop/apps/alacritty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ with lib; {
scrolling.history = 100000;
font = {
normal = {
family = "JetBrainsMono Nerd Font Mono";
family = "JetBrains Mono";
style = "Regular";
};
size = 11;
Expand Down
2 changes: 1 addition & 1 deletion modules/desktop/apps/waybar.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ in {
style = with colorScheme.palette; ''
* {
font-size: 14px;
font-family: JetBrainsMono Nerd Font, Font Awesome, sans-serif;
font-family: JetBrains Mono, sans-serif;
font-weight: bold;
}
Expand Down

0 comments on commit ced25b6

Please sign in to comment.