From c411e5dec95821353c805b56c10fb806b627e215 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Wed, 20 Sep 2023 15:01:04 +0100 Subject: [PATCH] home-manager/gui: Use Monocraft font --- home-manager/modules/gui/default.nix | 16 ++++++++++++---- home-manager/modules/gui/waybar.nix | 6 +++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/home-manager/modules/gui/default.nix b/home-manager/modules/gui/default.nix index a238e5a..b83c58e 100644 --- a/home-manager/modules/gui/default.nix +++ b/home-manager/modules/gui/default.nix @@ -4,6 +4,12 @@ let inherit (lib.my) mkBoolOpt'; cfg = config.my.gui; + + font = { + package = pkgs.monocraft; + name = "Monocraft"; + size = 10; + }; in { options.my.gui = { @@ -16,6 +22,7 @@ in { home = { packages = with pkgs; [ + font.package (nerdfonts.override { fonts = [ "DroidSansMono" "SourceCodePro" ]; }) @@ -43,13 +50,13 @@ in alacritty = { enable = true; settings = { - font.normal.family = "SauceCodePro Nerd Font Mono"; + font.normal.family = font.name; }; }; kitty = { enable = true; - font.name = "SauceCodePro Nerd Font Mono"; + inherit font; settings = { background_opacity = "0.8"; tab_bar_edge = "top"; @@ -197,6 +204,7 @@ in name = "Numix"; package = pkgs.numix-icon-theme; }; + font.name = font.name; }; qt = { enable = true; @@ -251,10 +259,10 @@ in }; }; - waybar = import ./waybar.nix { inherit lib pkgs config; }; + waybar = import ./waybar.nix { inherit lib pkgs config font; }; rofi = { enable = true; - font = "SauceCodePro Nerd Font Mono 14"; + font = "${font.name} ${toString font.size}"; plugins = with pkgs; [ rofi-calc rofi-emoji diff --git a/home-manager/modules/gui/waybar.nix b/home-manager/modules/gui/waybar.nix index 982f1ea..b5af542 100644 --- a/home-manager/modules/gui/waybar.nix +++ b/home-manager/modules/gui/waybar.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, ... }: +{ lib, pkgs, config, font, ... }: let inherit (lib) mkIf mkDefault mkMerge mkForce; @@ -155,8 +155,8 @@ in }; style = '' * { - font-size: 14px; - font-family: SauceCodePro Nerd Font Mono; + font-size: 12px; + font-family: ${font.name}; /*font-family: monospace;*/ }