nixos/fonts: rename fonts.fonts option to fonts.packages, other cleanups

fonts.fonts is not a great name and this also resolves a TODO.

Changed files
+45 -48
nixos
doc
manual
release-notes
modules
+2
nixos/doc/manual/release-notes/rl-2311.section.md
···
- `buildGoModule` `go-modules` attrs have been renamed to `goModules`.
+
- The `fonts.fonts` option has been renamed to `fonts.packages`.
+
- `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.
- 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.
-47
nixos/modules/config/fonts/fonts.nix
···
-
{ config, lib, pkgs, ... }:
-
-
with lib;
-
-
let
-
cfg = config.fonts;
-
-
defaultFonts =
-
[ pkgs.dejavu_fonts
-
pkgs.freefont_ttf
-
pkgs.gyre-fonts # TrueType substitutes for standard PostScript fonts
-
pkgs.liberation_ttf
-
pkgs.unifont
-
pkgs.noto-fonts-emoji
-
];
-
in
-
{
-
imports = [
-
(mkRemovedOptionModule [ "fonts" "enableCoreFonts" ] "Use fonts.fonts = [ pkgs.corefonts ]; instead.")
-
];
-
-
options = {
-
-
fonts = {
-
-
# TODO: find another name for it.
-
fonts = mkOption {
-
type = types.listOf types.path;
-
default = [];
-
example = literalExpression "[ pkgs.dejavu_fonts ]";
-
description = lib.mdDoc "List of primary font paths.";
-
};
-
-
enableDefaultFonts = mkOption {
-
type = types.bool;
-
default = false;
-
description = lib.mdDoc ''
-
Enable a basic set of fonts providing several font styles
-
and families and reasonable coverage of Unicode.
-
'';
-
};
-
};
-
-
};
-
-
config = { fonts.fonts = mkIf cfg.enableDefaultFonts defaultFonts; };
-
}
+42
nixos/modules/config/fonts/packages.nix
···
+
{ config, lib, pkgs, ... }:
+
+
let
+
cfg = config.fonts;
+
in
+
{
+
imports = [
+
(lib.mkRemovedOptionModule [ "fonts" "enableCoreFonts" ] "Use fonts.packages = [ pkgs.corefonts ]; instead.")
+
(lib.mkRenamedOptionModule [ "fonts" "fonts" ] [ "fonts" "packages" ])
+
];
+
+
options = {
+
fonts = {
+
packages = lib.mkOption {
+
type = with lib.types; listOf path;
+
default = [];
+
example = lib.literalExpression "[ pkgs.dejavu_fonts ]";
+
description = lib.mdDoc "List of primary font packages.";
+
};
+
+
enableDefaultFonts = lib.mkOption {
+
type = lib.types.bool;
+
default = false;
+
description = lib.mdDoc ''
+
Enable a basic set of fonts providing several styles
+
and families and reasonable coverage of Unicode.
+
'';
+
};
+
};
+
};
+
+
config = {
+
fonts.packages = lib.mkIf cfg.enableDefaultFonts (with pkgs; [
+
dejavu_fonts
+
freefont_ttf
+
gyre-fonts # TrueType substitutes for standard PostScript fonts
+
liberation_ttf
+
unifont
+
noto-fonts-emoji
+
]);
+
};
+
}
+1 -1
nixos/modules/module-list.nix
···
./config/debug-info.nix
./config/fonts/fontconfig.nix
./config/fonts/fontdir.nix
-
./config/fonts/fonts.nix
./config/fonts/ghostscript.nix
+
./config/fonts/packages.nix
./config/gnu.nix
./config/gtk/gtk-icon-cache.nix
./config/i18n.nix