summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2024-06-02 14:49:44 +0200
committerSilas Schöffel <sils@sils.li>2024-06-02 14:49:44 +0200
commit566134ae91f0cce76b7641cbb6eba7f3ea781cc5 (patch)
tree29d996db0eb45e634574fb54472b92bacbbe3446
parentenvironment: init module (diff)
downloadnix-config-566134ae91f0cce76b7641cbb6eba7f3ea781cc5.tar.gz
nix-config-566134ae91f0cce76b7641cbb6eba7f3ea781cc5.zip
font: init module
-rw-r--r--modules/nixos/sils/default.nix1
-rw-r--r--modules/nixos/sils/font.nix25
-rw-r--r--modules/nixos/sils/roles.nix1
-rw-r--r--sys/default.nix1
-rw-r--r--sys/font/default.nix15
5 files changed, 27 insertions, 16 deletions
diff --git a/modules/nixos/sils/default.nix b/modules/nixos/sils/default.nix
index 9324c46..7135ff9 100644
--- a/modules/nixos/sils/default.nix
+++ b/modules/nixos/sils/default.nix
@@ -3,6 +3,7 @@
     ./basesystem.nix
     ./bluetooth.nix
     ./environment.nix
+    ./font.nix
     ./hyprland.nix
     ./meta.nix
     ./networking.nix
diff --git a/modules/nixos/sils/font.nix b/modules/nixos/sils/font.nix
new file mode 100644
index 0000000..879459d
--- /dev/null
+++ b/modules/nixos/sils/font.nix
@@ -0,0 +1,25 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}: let
+  cfg = config.sils.font;
+in {
+  options.sils.font.enable = lib.mkEnableOption "font config";
+  config = lib.mkIf cfg.enable {
+    fonts = {
+      packages = with pkgs; [
+        nerdfonts
+      ];
+      fontconfig = {
+        defaultFonts = {
+          # serif = ["Vazir"];
+          # sansSerif = ["Vazir"];
+          monospace = ["SourceCodePro"];
+        };
+      };
+      fontDir.enable = true;
+    };
+  };
+}
diff --git a/modules/nixos/sils/roles.nix b/modules/nixos/sils/roles.nix
index 8ab2df3..e973759 100644
--- a/modules/nixos/sils/roles.nix
+++ b/modules/nixos/sils/roles.nix
@@ -7,6 +7,7 @@ in {
       basesystem.enable = true;
       bluetooth.enable = true;
       environment.enable = true;
+      font.enable = true;
       hyprland.enable = true;
       networking.enable = true;
       nix-config.enable = true;
diff --git a/sys/default.nix b/sys/default.nix
index 18698e2..3955d12 100644
--- a/sys/default.nix
+++ b/sys/default.nix
@@ -1,6 +1,5 @@
 {...}: {
   imports = [
-    ./font
     ./impermanence
     ./keyboard
     ./opengl
diff --git a/sys/font/default.nix b/sys/font/default.nix
deleted file mode 100644
index 770200f..0000000
--- a/sys/font/default.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{pkgs, ...}: {
-  fonts = {
-    packages = with pkgs; [
-      nerdfonts
-    ];
-    fontconfig = {
-      defaultFonts = {
-        # serif = ["Vazir"];
-        # sansSerif = ["Vazir"];
-        monospace = ["SourceCodePro"];
-      };
-    };
-    fontDir.enable = true;
-  };
-}