From 566134ae91f0cce76b7641cbb6eba7f3ea781cc5 Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Sun, 2 Jun 2024 14:49:44 +0200 Subject: font: init module --- modules/nixos/sils/default.nix | 1 + modules/nixos/sils/font.nix | 25 +++++++++++++++++++++++++ modules/nixos/sils/roles.nix | 1 + sys/default.nix | 1 - sys/font/default.nix | 15 --------------- 5 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 modules/nixos/sils/font.nix delete mode 100644 sys/font/default.nix 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; - }; -} -- cgit 1.4.1