From 1aa8d3f7f621b2fe6f8e04899f7ab56aac0fbff9 Mon Sep 17 00:00:00 2001 From: Mirza Arnaut Date: Fri, 6 Dec 2024 16:13:28 +0100 Subject: [PATCH] Cleanup fonts on NixOS --- .../home-manager/pc/desktop/sway/default.nix | 9 ++------ .../home-manager/pc/desktop/sway/services.nix | 2 -- .../home-manager/pc/desktop/sway/theme.nix | 5 ---- .../home-manager/pc/terminal/alacritty.nix | 8 ------- modules/home-manager/theming/fonts.nix | 7 +++--- modules/nixos/environment/fonts.nix | 23 +++++++++++++------ 6 files changed, 22 insertions(+), 32 deletions(-) diff --git a/modules/home-manager/pc/desktop/sway/default.nix b/modules/home-manager/pc/desktop/sway/default.nix index 8188a0b..46c2c90 100644 --- a/modules/home-manager/pc/desktop/sway/default.nix +++ b/modules/home-manager/pc/desktop/sway/default.nix @@ -34,11 +34,6 @@ in config = rec { modifier = "Mod4"; terminal = "wezterm"; - fonts = { - names = [ "FiraCode Nerd Font Mono" ]; - style = "Regular"; - size = 10.0; - }; window = { border = 2; titlebar = false; @@ -85,9 +80,9 @@ in workspaceNumbers = false; trayOutput = "primary"; fonts = { - names = [ "FiraCode Nerd Font Mono" ]; + names = [ config.stylix.fonts.sansSerif.name ]; style = "Regular"; - size = 11.0; + size = config.stylix.fonts.sizes.desktop + 0.0; }; } ]; diff --git a/modules/home-manager/pc/desktop/sway/services.nix b/modules/home-manager/pc/desktop/sway/services.nix index bdf29ba..17cdf00 100644 --- a/modules/home-manager/pc/desktop/sway/services.nix +++ b/modules/home-manager/pc/desktop/sway/services.nix @@ -21,8 +21,6 @@ config = lib.mkIf config.sway.services.enable { programs.rofi = { enable = true; - # font = "FiraCode Nerd Font Mono 14"; - # theme = "${catppuccin-rofi}/basic/.local/share/rofi/themes/catppuccin-${flavor}.rasi"; }; # services.mako = { diff --git a/modules/home-manager/pc/desktop/sway/theme.nix b/modules/home-manager/pc/desktop/sway/theme.nix index 6fded80..2905372 100644 --- a/modules/home-manager/pc/desktop/sway/theme.nix +++ b/modules/home-manager/pc/desktop/sway/theme.nix @@ -62,11 +62,6 @@ in # workspaceButtons = true; # workspaceNumbers = false; # trayOutput = "primary"; - # fonts = { - # names = [ "FiraCode Nerd Font Mono" ]; - # style = "Regular"; - # size = 11.0; - # }; # colors = { # background = "$base"; # statusline = "$text"; diff --git a/modules/home-manager/pc/terminal/alacritty.nix b/modules/home-manager/pc/terminal/alacritty.nix index 428231d..2f76e02 100644 --- a/modules/home-manager/pc/terminal/alacritty.nix +++ b/modules/home-manager/pc/terminal/alacritty.nix @@ -32,14 +32,6 @@ # y = 0; # x = 0; # }; - # bold = { - # style = "Bold"; - # family = "FiraCode Nerd Font"; - # }; - # normal = { - # style = "Regular"; - # family = "FiraCode Nerd Font"; - # }; # }; }; }; diff --git a/modules/home-manager/theming/fonts.nix b/modules/home-manager/theming/fonts.nix index fe7b054..a207d57 100644 --- a/modules/home-manager/theming/fonts.nix +++ b/modules/home-manager/theming/fonts.nix @@ -22,9 +22,10 @@ in serif = cantarell; sansSerif = cantarell; monospace = { - name = "FiraCode Nerd Font"; - package = pkgs.fira-code; - # package = pkgs.fira-code-nerdfont; + name = "FiraCode Nerd Font Mono"; + # package = pkgs.unstable.nerd-fonts.fira-code; + # package = pkgs.fira-code; + package = pkgs.fira-code-nerdfont; }; }; }; diff --git a/modules/nixos/environment/fonts.nix b/modules/nixos/environment/fonts.nix index bb990e7..ec71aaf 100644 --- a/modules/nixos/environment/fonts.nix +++ b/modules/nixos/environment/fonts.nix @@ -1,14 +1,23 @@ { + config, pkgs, ... }: { - fonts.packages = with pkgs; [ - aileron # helvetica - jetbrains-mono - liberation_ttf # Times New Roman, Arial, and Courier New - (nerdfonts.override { fonts = [ "FiraCode" ]; }) - noto-fonts-color-emoji - ]; + fonts.packages = + (with pkgs; [ + aileron # helvetica + jetbrains-mono + liberation_ttf # Times New Roman, Arial, and Courier New + # (nerdfonts.override { fonts = [ "FiraCode" ]; }) + # unstable.nerd-fonts.fira-code + noto-fonts-color-emoji + ]) + ++ [ + config.stylix.fonts.monospace.package + config.stylix.fonts.serif.package + config.stylix.fonts.sansSerif.package + config.stylix.fonts.emoji.package + ]; }