From af29c176b8ceef254d7e8b557f72e03ea3cb4000 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 7 Dec 2024 15:57:13 +0100 Subject: refactor(modules/font): Use new `nerd-fonts` attr set --- modules/by-name/fo/fonts/module.nix | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'modules/by-name/fo') diff --git a/modules/by-name/fo/fonts/module.nix b/modules/by-name/fo/fonts/module.nix index abd5664b..057c3f36 100644 --- a/modules/by-name/fo/fonts/module.nix +++ b/modules/by-name/fo/fonts/module.nix @@ -10,11 +10,11 @@ in { enable = lib.mkEnableOption "fonts"; fonts = lib.mkOption { - type = lib.types.listOf lib.types.str; - example = lib.literalExpression ''["SourceCodePro" "Overpass" "FiraCode"]''; - default = [ - "SourceCodePro" - "Overpass" + type = lib.types.listOf lib.types.package; + example = lib.literalExpression ''with pkgs.nerdfonts; [SourceCodePro Overpass FiraCode]''; + default = with pkgs.nerd-fonts; [ + sauce-code-pro + overpass ]; description = "The nerd-fonts to install"; }; @@ -24,14 +24,8 @@ in { config = lib.mkIf cfg.enable { fonts = { - packages = let - nerdFont = pkgs.nerdfonts.override { - inherit (cfg) fonts; - }; - in - [ - nerdFont - ] + packages = + cfg.fonts ++ (with pkgs; [liberation_ttf]) ++ lib.optional cfg.enableEmoji pkgs.noto-fonts-emoji; -- cgit 1.4.1