about summary refs log tree commit diff
path: root/modules/common/stylix.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/common/stylix.nix51
1 files changed, 28 insertions, 23 deletions
diff --git a/modules/common/stylix.nix b/modules/common/stylix.nix
index 953685e..9a360ad 100644
--- a/modules/common/stylix.nix
+++ b/modules/common/stylix.nix
@@ -3,6 +3,7 @@
   inputs,
   lib,
   pkgs,
+  this,
   ...
 }:
 with lib;
@@ -76,29 +77,33 @@ with lib;
     fonts = {
       packages = mkAfter config.nixfiles.modules.common.stylix.fonts.extraPackages;
 
-      fontconfig.defaultFonts = with config.stylix.fonts; {
-        serif = mkForce [
-          serif.name
-          "Sarasa Gothic"
-          "Source Han Serif"
-          "Noto Serif"
-        ];
-        sansSerif = mkForce [
-          sansSerif.name
-          "Sarasa Gothic"
-          "Source Han Sans"
-          "Noto Sans"
-        ];
-        monospace = mkForce [
-          monospace.name
-          "Sarasa Mono"
-          "Source Han Mono"
-          "Noto Sans Mono"
-        ];
-        emoji = mkForce [
-          "Twitter Color Emoji"
-          "Noto Color Emoji"
-        ];
+      fontconfig = {
+        enable = this.isHeadful;
+
+        defaultFonts = with config.stylix.fonts; {
+          serif = mkForce [
+            serif.name
+            "Sarasa Gothic"
+            "Source Han Serif"
+            "Noto Serif"
+          ];
+          sansSerif = mkForce [
+            sansSerif.name
+            "Sarasa Gothic"
+            "Source Han Sans"
+            "Noto Sans"
+          ];
+          monospace = mkForce [
+            monospace.name
+            "Sarasa Mono"
+            "Source Han Mono"
+            "Noto Sans Mono"
+          ];
+          emoji = mkForce [
+            "Twitter Color Emoji"
+            "Noto Color Emoji"
+          ];
+        };
       };
     };
   };

Consider giving Nix/NixOS a try! <3