From 6e41f78863a3d03a5e9fa4c3e90b6c0a406fe4f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 25 Sep 2019 10:11:18 +0200 Subject: [PATCH] feat: the font revolution --- configs/default.nix | 3 +-- configs/dunst.nix | 2 +- configs/fonts.nix | 36 ++++++++++++++++++++++++------------ configs/i3.nix | 4 ++-- configs/packages/default.nix | 2 +- configs/rofi.nix | 2 +- modules/constants.nix | 9 +-------- 7 files changed, 31 insertions(+), 27 deletions(-) diff --git a/configs/default.nix b/configs/default.nix index 1f95fae..b4b3341 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -55,7 +55,7 @@ in # - + # { niveum.user = { @@ -102,7 +102,6 @@ in autorenkalender = pkgs.callPackage {}; bvg = pkgs.callPackage {}; daybook = pkgs.callPackage {}; - font-size = pkgs.callPackage { font = config.niveum.fonts.terminal; }; genius = pkgs.callPackage {}; instaget = pkgs.callPackage {}; literature-quote = pkgs.callPackage {}; diff --git a/configs/dunst.nix b/configs/dunst.nix index a77db9e..75fe281 100644 --- a/configs/dunst.nix +++ b/configs/dunst.nix @@ -6,7 +6,7 @@ with config.niveum; { settings = { global = { transparency = 10; - font = "${fonts.terminal.name} ${toString fonts.terminal.size}"; + font = "Monospace ${toString fonts.size}"; geometry = "200x5-30+20"; frame_color = colours.foreground; follow = "mouse"; diff --git a/configs/fonts.nix b/configs/fonts.nix index 374bb5b..67cd53b 100644 --- a/configs/fonts.nix +++ b/configs/fonts.nix @@ -1,22 +1,34 @@ { pkgs, ... }: { - niveum.fonts = { - ui = { - name = "Sans"; - size = 9; - }; - terminal = { - name = "Monospace"; - size = 9; - }; - }; + niveum.fonts.size = 9; fonts = { enableDefaultFonts = true; enableFontDir = true; - fonts = with pkgs; [ inconsolata corefonts eb-garamond fira libertine lmodern noto-fonts roboto roboto-mono roboto-slab ubuntu_font_family ]; + fonts = with pkgs; [ + corefonts + eb-garamond + fira + font-awesome-ttf + ibm-plex + inconsolata + iosevka + libertine + lmodern + noto-fonts + roboto + roboto-mono + roboto-slab + source-code-pro + source-serif-pro + ubuntu_font_family + ]; fontconfig = { - defaultFonts.monospace = [ "Inconsolata" ]; + defaultFonts = { + monospace = [ "Source Code Pro" ]; + serif = [ "Source Serif Pro" ]; + sansSerif = [ "IBM Plex" ]; + }; ultimate = { enable = true; substitutions = "combi"; diff --git a/configs/i3.nix b/configs/i3.nix index ae7940e..74fd040 100644 --- a/configs/i3.nix +++ b/configs/i3.nix @@ -15,7 +15,7 @@ in with config.niveum; { home-manager.users.me.xsession.windowManager.i3 = { enable = true; config = rec { - fonts = [ "${config.niveum.fonts.ui.name} ${toString config.niveum.fonts.ui.size}" ]; + fonts = [ "Sans ${toString config.niveum.fonts.size}" ]; modifier = "Mod4"; window = { titlebar = false; @@ -49,7 +49,7 @@ in with config.niveum; { }; bars = [{ workspaceButtons = false; - fonts = [ "${config.niveum.fonts.terminal.name} ${toString config.niveum.fonts.terminal.size}" ]; + fonts = [ "Monospace ${toString config.niveum.fonts.size}" ]; mode = "hide"; colors = rec { background = colours.background; diff --git a/configs/packages/default.nix b/configs/packages/default.nix index 843537d..96fd658 100644 --- a/configs/packages/default.nix +++ b/configs/packages/default.nix @@ -104,7 +104,7 @@ kmein.daybook kmein.depp kmein.dirmir - kmein.font-size + # kmein.font-size (removed) # kmein.fzf-wrappers (broken) kmein.genius kmein.instaget diff --git a/configs/rofi.nix b/configs/rofi.nix index 5e3a7fc..7e50339 100644 --- a/configs/rofi.nix +++ b/configs/rofi.nix @@ -7,7 +7,7 @@ with config.niveum; { terminal = applications.terminal; borderWidth = 0; lines = 5; - font = "${fonts.terminal.name} ${toString (fonts.terminal.size + 1)}"; + font = "Monospace ${toString (fonts.size + 1)}"; colors = rec { window = rec { background = colours.foreground; diff --git a/modules/constants.nix b/modules/constants.nix index 669a487..7b100fa 100644 --- a/modules/constants.nix +++ b/modules/constants.nix @@ -16,12 +16,6 @@ let package = mkOption { type = types.package; }; }; }; - my-types.font = types.submodule { - options = { - name = mkOption { type = types.str; }; - size = mkOption { type = types.ints.positive; }; - }; - }; my-types.colourTheme = types.submodule { options = { @@ -80,8 +74,7 @@ in { }; fonts = { - terminal = mkOption { type = my-types.font; }; - ui = mkOption { type = my-types.font; }; + size = mkOption { type = types.int; }; }; user = {