zaphyra's git: nixfiles

zaphyra and void's nixfiles

commit 1f7375ebfa7ddb4cb17a7301518c05e152982045
parent 8f19c1c15b54b068adbcb3b2911e5df7118119c9
Author: Katja (ctucx) <git@ctu.cx>
Date: Sat, 17 May 2025 17:11:57 +0200

config/nixos/modules/fonts: add some fonts
2 files changed, 41 insertions(+), 6 deletions(-)
M
config/nixos/modules/font.nix
|
20
++++++++++++++------
A
config/nixos/modules/presets/void/enable.nix
|
27
+++++++++++++++++++++++++++
diff --git a/config/nixos/modules/font.nix b/config/nixos/modules/font.nix
@@ -20,12 +20,20 @@ in
 
   config = lib.mkIf cfg.enable {
     fonts = {
-      packages = with pkgs; [ meslo-lgs-nf ];
-      fontconfig = {
-        defaultFonts = {
-          monospace = [ "MesloLGS NF" ];
-        };
-      };
+      fontconfig.enable      = true;
+      fontDir.enable         = true;
+      enableGhostscriptFonts = true;
+      enableDefaultPackages  = true;
+      packages  = with pkgs; [
+        dejavu_fonts
+        liberation_ttf
+        ttf_bitstream_vera
+        noto-fonts
+        noto-fonts-emoji
+        fira-code
+        fira-mono
+        meslo-lgs-nf
+      ];
     };
   };
 
diff --git a/config/nixos/modules/presets/void/enable.nix b/config/nixos/modules/presets/void/enable.nix
@@ -0,0 +1,27 @@
+{
+  povSelf,
+  pkgs,
+  lib,
+  config,
+  hostConfig,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+in
+{
+
+  option = {
+    type = types.bool;
+    default = false;
+  };
+
+  config = lib.mkIf cfg {
+    fonts.fontconfig.defaultFonts = {
+      monospace = [ "MesloLGS NF" ];
+    };
+  };
+
+}