From 031c27317d63a98bb9896a4baa9b19c155ac62a9 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 30 Jul 2023 20:06:40 +0300 Subject: 2023-07-30 --- modules/common/fonts.nix | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'modules/common') diff --git a/modules/common/fonts.nix b/modules/common/fonts.nix index f3a79c2..adf6a3f 100644 --- a/modules/common/fonts.nix +++ b/modules/common/fonts.nix @@ -1,12 +1,9 @@ { - config, lib, pkgs, ... }: -with lib; let - cfg = config.nixfiles.modules.fonts; -in { +with lib; { imports = [ (mkAliasOptionModule ["fontScheme"] [ "nixfiles" @@ -19,6 +16,17 @@ in { options.nixfiles.modules.fonts = { enable = mkEnableOption "fonts and their configurations"; + packages = mkOption { + description = "Font packages to install."; + type = with types; listOf package; + default = with pkgs; [ + (iosevka-bin.override {variant = "aile";}) + (iosevka-bin.override {variant = "etoile";}) + iosevka-bin + sarasa-gothic + ]; + }; + fontScheme = let mkFont = { family, @@ -79,13 +87,4 @@ in { }; }; }; - - config = mkIf cfg.enable { - fonts.packages = with pkgs; [ - (iosevka-bin.override {variant = "aile";}) - (iosevka-bin.override {variant = "etoile";}) - iosevka-bin - sarasa-gothic - ]; - }; } -- cgit 1.4.1