From a3ce3b2944791604693dde69a3494faa2d09b08d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Fri, 19 Jan 2024 17:13:40 +0100 Subject: [PATCH] feat: Enable fallback fonts --- nixos/stylix-config.nix | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/nixos/stylix-config.nix b/nixos/stylix-config.nix index 779bb57..2829e24 100644 --- a/nixos/stylix-config.nix +++ b/nixos/stylix-config.nix @@ -1,26 +1,29 @@ { config, pkgs }: let cfg = config.jconfig.styling; - # nerdFontSymbols = pkgs.nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }; - # fallbackSymbols = { - # name = "Symbols Nerd Font"; - # package = nerdFontSymbols; - # }; + nerdFontSymbols = pkgs.nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }; + fallbackSymbols = { + name = "Symbols Nerd Font"; + package = nerdFontSymbols; + }; in { autoEnable = cfg.enable; image = cfg.wallpaper; base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml"; polarity = "dark"; - fonts.monospace.name = "JetBrains Mono"; - fonts.monospace.package = pkgs.jetbrains-mono; - fonts.sansSerif.name = "Noto Sans"; - fonts.sansSerif.package = pkgs.noto-fonts; - fonts.serif.name = "Noto Serif"; - fonts.serif.package = pkgs.noto-fonts; - # fonts.fallbackFonts.monospace = [ fallbackSymbols ]; - # fonts.fallbackFonts.sansSerif = [ fallbackSymbols ]; - # fonts.fallbackFonts.serif = [ fallbackSymbols ]; + fonts.monospace = [ + { name = "JetBrains Mono"; package = pkgs.jetbrains-mono; } + fallbackSymbols + ]; + fonts.sansSerif = [ + { name = "Noto Sans"; package = pkgs.noto-fonts; } + fallbackSymbols + ]; + fonts.serif = [ + { name = "Noto Serif"; package = pkgs.noto-fonts; } + fallbackSymbols + ]; fonts.sizes.popups = 12; targets.plymouth.logoAnimated = false; targets.plymouth.logo = cfg.bootLogo;