about summary refs log tree commit diff
path: root/modules/common/stylix.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-05-04 16:11:40 +0300
committerAzat Bahawi <azat@bahawi.net>2024-05-04 16:11:40 +0300
commit3cd3233f7eaf2a8a715d587820d6d4577a24d958 (patch)
treef87bd583c383b8ac3496229ab6f1d3a00a2253a0 /modules/common/stylix.nix
parent2024-05-02 (diff)
2024-05-04
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