summary refs log tree commit diff stats
path: root/system/settings
diff options
context:
space:
mode:
Diffstat (limited to 'system/settings')
-rw-r--r--system/settings/services/xserver.nix34
1 files changed, 20 insertions, 14 deletions
diff --git a/system/settings/services/xserver.nix b/system/settings/services/xserver.nix
index 1105f17f..69f26307 100644
--- a/system/settings/services/xserver.nix
+++ b/system/settings/services/xserver.nix
@@ -1,5 +1,6 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
 
+with lib;
 { services.xserver = {
     enable = true;
     enableCtrlAltBackspace = true;
@@ -36,18 +37,19 @@
     enableFontDir = true;
     enableDefaultFonts = false;
     fontconfig = {
-      useEmbeddedBitmaps = true;
-      defaultFonts = {
-        monospace = [ "Liberation Mono" ];
-        sansSerif = [ "Liberation Sans" ];
-        serif = [ "Liberation Serif" ];
+      antialias = true;
+      subpixel = mkIf config.fonts.fontconfig.antialias {
+        lcdfilter = "light";
       };
-      penultimate = {
+      ultimate = mkIf config.fonts.fontconfig.antialias {
         enable = true;
+        preset = "ultimate3";
       };
-      ultimate = {
-        enable = false;
-        preset = "osx";
+      useEmbeddedBitmaps = !config.fonts.fontconfig.antialias;
+      defaultFonts = {
+        monospace = [ "Source Code Pro" ];
+        sansSerif = [ "Tahoma" ];
+        serif = [ "Times New Roman" ];
       };
     };
     fonts = with pkgs; [
@@ -56,14 +58,21 @@
       tamsyn
       terminus_font
 
+      corefonts
+
       fantasque-sans-mono
       emacs-all-the-icons-fonts
+      font-awesome_5
+      xorg.fontmiscmisc
+      xorg.fontcursormisc
+      xorg.fontbhlucidatypewriter100dpi
+    ] ++ lib.optionals config.fonts.fontconfig.antialias [
       fira
       fira-code
       fira-mono
       go-font
-      font-awesome_5
       ibm-plex
+
       liberation_ttf
       mononoki
       roboto
@@ -72,9 +81,6 @@
       source-code-pro
       source-sans-pro
       source-serif-pro
-      xorg.fontmiscmisc
-      xorg.fontcursormisc
-      xorg.fontbhlucidatypewriter100dpi
     ];
   };
 }