nixos/fonts: rename fonts.fonts option to fonts.packages, other cleanups
fonts.fonts is not a great name and this also resolves a TODO.
This commit is contained in:
parent
54d3317d12
commit
5162df3239
|
@ -121,6 +121,8 @@
|
||||||
|
|
||||||
- `buildGoModule` `go-modules` attrs have been renamed to `goModules`.
|
- `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.
|
- `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.
|
- 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.
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
{ 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
Normal file
42
nixos/modules/config/fonts/packages.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{ 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
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,8 +4,8 @@
|
||||||
./config/debug-info.nix
|
./config/debug-info.nix
|
||||||
./config/fonts/fontconfig.nix
|
./config/fonts/fontconfig.nix
|
||||||
./config/fonts/fontdir.nix
|
./config/fonts/fontdir.nix
|
||||||
./config/fonts/fonts.nix
|
|
||||||
./config/fonts/ghostscript.nix
|
./config/fonts/ghostscript.nix
|
||||||
|
./config/fonts/packages.nix
|
||||||
./config/gnu.nix
|
./config/gnu.nix
|
||||||
./config/gtk/gtk-icon-cache.nix
|
./config/gtk/gtk-icon-cache.nix
|
||||||
./config/i18n.nix
|
./config/i18n.nix
|
||||||
|
|
Loading…
Reference in a new issue