···3434On NixOS, it can be installed using the following expression:
35353636```nix
3737-{ pkgs, ... }: { fonts.fonts = with pkgs; [ noto-fonts-emoji ]; }
3737+{ pkgs, ... }: {
3838+ fonts.packages = with pkgs; [ noto-fonts-emoji ];
3939+}
3840```
+2
nixos/doc/manual/release-notes/rl-2311.section.md
···123123124124- `buildGoModule` `go-modules` attrs have been renamed to `goModules`.
125125126126+- The `fonts.fonts` and `fonts.enableDefaultFonts` options have been renamed to `fonts.packages` and `fonts.enableDefaultPackages` respectively.
127127+126128- `services.fail2ban.jails` can now be configured with attribute sets defining settings and filters instead of lines. The stringed options `daemonConfig` and `extraSettings` have respectively been replaced by `daemonSettings` and `jails.DEFAULT.settings` which use attribute sets.
127129128130- The module [services.ankisyncd](#opt-services.ankisyncd.package) has been switched to [anki-sync-server-rs](https://github.com/ankicommunity/anki-sync-server-rs) from the old python version, which was difficult to update, had not been updated in a while, and did not support recent versions of anki.
···11-{ config, lib, pkgs, ... }:
22-33-with lib;
44-55-let
66- cfg = config.fonts;
77-88- defaultFonts =
99- [ pkgs.dejavu_fonts
1010- pkgs.freefont_ttf
1111- pkgs.gyre-fonts # TrueType substitutes for standard PostScript fonts
1212- pkgs.liberation_ttf
1313- pkgs.unifont
1414- pkgs.noto-fonts-emoji
1515- ];
1616-in
1717-{
1818- imports = [
1919- (mkRemovedOptionModule [ "fonts" "enableCoreFonts" ] "Use fonts.fonts = [ pkgs.corefonts ]; instead.")
2020- ];
2121-2222- options = {
2323-2424- fonts = {
2525-2626- # TODO: find another name for it.
2727- fonts = mkOption {
2828- type = types.listOf types.path;
2929- default = [];
3030- example = literalExpression "[ pkgs.dejavu_fonts ]";
3131- description = lib.mdDoc "List of primary font paths.";
3232- };
3333-3434- enableDefaultFonts = mkOption {
3535- type = types.bool;
3636- default = false;
3737- description = lib.mdDoc ''
3838- Enable a basic set of fonts providing several font styles
3939- and families and reasonable coverage of Unicode.
4040- '';
4141- };
4242- };
4343-4444- };
4545-4646- config = { fonts.fonts = mkIf cfg.enableDefaultFonts defaultFonts; };
4747-}
+10-20
nixos/modules/config/fonts/ghostscript.nix
···33with lib;
4455{
66-76 options = {
88-99- fonts = {
1010-1111- enableGhostscriptFonts = mkOption {
1212- type = types.bool;
1313- default = false;
1414- description = lib.mdDoc ''
1515- Whether to add the fonts provided by Ghostscript (such as
1616- various URW fonts and the “Base-14” Postscript fonts) to the
1717- list of system fonts, making them available to X11
1818- applications.
1919- '';
2020- };
2121-77+ fonts.enableGhostscriptFonts = mkOption {
88+ type = types.bool;
99+ default = false;
1010+ description = lib.mdDoc ''
1111+ Whether to add the fonts provided by Ghostscript (such as
1212+ various URW fonts and the “Base-14” Postscript fonts) to the
1313+ list of system fonts, making them available to X11
1414+ applications.
1515+ '';
2216 };
23172418 };
25192626-2720 config = mkIf config.fonts.enableGhostscriptFonts {
2828-2929- fonts.fonts = [ "${pkgs.ghostscript}/share/ghostscript/fonts" ];
3030-2121+ fonts.packages = [ "${pkgs.ghostscript}/share/ghostscript/fonts" ];
3122 };
3232-3323}
···375375376376 # Munin is hardcoded to use DejaVu Mono and the graphs come out wrong if
377377 # it's not available.
378378- fonts.fonts = [ pkgs.dejavu_fonts ];
378378+ fonts.packages = [ pkgs.dejavu_fonts ];
379379380380 systemd.timers.munin-cron = {
381381 description = "batch Munin master programs";
···103103 passthru = {
104104 # This is set primarily to help find-tarballs.nix to do its job
105105 packages = pkgList.all;
106106- # useful for inclusion in the `fonts.fonts` nixos option or for use in devshells
106106+ # useful for inclusion in the `fonts.packages` nixos option or for use in devshells
107107 fonts = "${texmfroot}/texmf-dist/fonts";
108108 };
109109