diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-07 15:57:13 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-07 15:57:13 +0100 |
commit | af29c176b8ceef254d7e8b557f72e03ea3cb4000 (patch) | |
tree | e59d63c0d6bcaf7b2fb6df65a250677c3efc291c /modules/by-name/fo/fonts/module.nix | |
parent | build(flake): Update to nixos-24.11 on the stable version (diff) | |
download | nixos-config-af29c176b8ceef254d7e8b557f72e03ea3cb4000.tar.gz nixos-config-af29c176b8ceef254d7e8b557f72e03ea3cb4000.zip |
refactor(modules/font): Use new `nerd-fonts` attr set
Diffstat (limited to 'modules/by-name/fo/fonts/module.nix')
-rw-r--r-- | modules/by-name/fo/fonts/module.nix | 20 |
1 files changed, 7 insertions, 13 deletions
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; |