From 155902744bae2c8287742232025fb1659f727f50 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 9 May 2022 15:26:39 +0200 Subject: refactor(tazjin/nixos): Extract font configuration module Change-Id: I067d832155db61fb426ea3435e038231f321f71a Reviewed-on: https://cl.tvl.fyi/c/depot/+/5545 Tested-by: BuildkiteCI Reviewed-by: tazjin Autosubmit: tazjin --- users/tazjin/nixos/modules/fonts.nix | 24 ++++++++++++++++++++++++ users/tazjin/nixos/tverskoy/default.nix | 20 +------------------- 2 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 users/tazjin/nixos/modules/fonts.nix (limited to 'users/tazjin') diff --git a/users/tazjin/nixos/modules/fonts.nix b/users/tazjin/nixos/modules/fonts.nix new file mode 100644 index 000000000000..3b4461056f24 --- /dev/null +++ b/users/tazjin/nixos/modules/fonts.nix @@ -0,0 +1,24 @@ +# Attempt at configuring reasonable font-rendering. + +{ pkgs, ... }: + +{ + fonts = { + fonts = with pkgs; [ + corefonts + dejavu_fonts + jetbrains-mono + noto-fonts-cjk + noto-fonts-emoji + ]; + + fontconfig = { + hinting.enable = true; + subpixel.lcdfilter = "light"; + + defaultFonts = { + monospace = [ "JetBrains Mono" ]; + }; + }; + }; +} diff --git a/users/tazjin/nixos/tverskoy/default.nix b/users/tazjin/nixos/tverskoy/default.nix index b789e50d43f3..c2a8367846c4 100644 --- a/users/tazjin/nixos/tverskoy/default.nix +++ b/users/tazjin/nixos/tverskoy/default.nix @@ -15,6 +15,7 @@ lib.fix (self: { imports = [ (mod "open_eid.nix") (usermod "physical.nix") + (usermod "fonts.nix") "${depot.third_party.impermanence}/nixos.nix" "${pkgs.home-manager.src}/nixos" ] ++ lib.optional (builtins.pathExists ./local-config.nix) ./local-config.nix; @@ -108,25 +109,6 @@ lib.fix (self: { ]; }; - fonts = { - fonts = with pkgs; [ - corefonts - dejavu_fonts - jetbrains-mono - noto-fonts-cjk - noto-fonts-emoji - ]; - - fontconfig = { - hinting.enable = true; - subpixel.lcdfilter = "light"; - - defaultFonts = { - monospace = [ "JetBrains Mono" ]; - }; - }; - }; - environment.persistence."/persist" = { directories = [ "/etc/NetworkManager/system-connections" -- cgit 1.4.1