diff --git a/system/fonts.nix b/system/fonts.nix index 2e6f5ee3d2ee..75906d3e8c7b 100644 --- a/system/fonts.nix +++ b/system/fonts.nix @@ -1,4 +1,4 @@ -{pkgs , config}: +{pkgs, config}: [ # - the user's .fonts directory @@ -18,6 +18,8 @@ pkgs.xorg.fontbh100dpi pkgs.xorg.fontmiscmisc pkgs.xorg.fontcursormisc -] ++ -((config.get ["fonts" "extraFonts"]) pkgs) +] +++ pkgs.lib.optional (config.get ["fonts" "enableGhostscriptFonts"]) "${pkgs.ghostscript}/share/ghostscript/fonts" + +++ ((config.get ["fonts" "extraFonts"]) pkgs) diff --git a/system/options.nix b/system/options.nix index 2ee61a00de0b..4da6eb290a90 100644 --- a/system/options.nix +++ b/system/options.nix @@ -1109,17 +1109,28 @@ root ALL=(ALL) SETENV: ALL { - name = ["fonts" "enableFontConfig"]; + name = ["fonts" "enableFontConfig"]; # !!! should be enableFontconfig default = true; description = " - If enabled, a fontconfig configuration file will be built + If enabled, a Fontconfig configuration file will be built pointing to a set of default fonts. If you don't care about running X11 applications or any other program that uses - fontconfig, you can turn this option off and prevent a + Fontconfig, you can turn this option off and prevent a dependency on all those fonts. "; } + { + name = ["fonts" "enableGhostscriptFonts"]; + default = false; + description = " + Whether to add the fonts provided by Ghostscript (such as + various URW fonts and the “Base-14” Postscript fonts) to the + list of system fonts, making them available to X11 + applications. + "; + } + { name = ["fonts" "extraFonts"]; default = pkgs:[];