treewide: rename fonts.fonts to fonts.packages

Changed files
+27 -25
doc
builders
packages
nixos
pkgs
tools
typesetting
tex
texlive
+3 -1
doc/builders/packages/ibus.section.md
···
On NixOS, it can be installed using the following expression:
```nix
-
{ pkgs, ... }: { fonts.fonts = with pkgs; [ noto-fonts-emoji ]; }
```
···
On NixOS, it can be installed using the following expression:
```nix
+
{ pkgs, ... }: {
+
fonts.packages = with pkgs; [ noto-fonts-emoji ];
+
}
```
+2 -2
nixos/modules/config/fonts/fontconfig.nix
···
# looking things up.
makeCacheConf = { }:
let
-
makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
cache = makeCache pkgs.fontconfig;
cache32 = makeCache pkgs.pkgsi686Linux.fontconfig;
in
···
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
<fontconfig>
<!-- Font directories -->
-
${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)}
${optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) ''
<!-- Pre-generated font caches -->
<cachedir>${cache}</cachedir>
···
# looking things up.
makeCacheConf = { }:
let
+
makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.packages; };
cache = makeCache pkgs.fontconfig;
cache32 = makeCache pkgs.pkgsi686Linux.fontconfig;
in
···
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
<fontconfig>
<!-- Font directories -->
+
${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.packages)}
${optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) ''
<!-- Pre-generated font caches -->
<cachedir>${cache}</cachedir>
+1 -1
nixos/modules/config/fonts/fontdir.nix
···
x11Fonts = pkgs.runCommand "X11-fonts" { preferLocalBuild = true; } ''
mkdir -p "$out/share/X11/fonts"
font_regexp='.*\.\(ttf\|ttc\|otb\|otf\|pcf\|pfa\|pfb\|bdf\)\(\.gz\)?'
-
find ${toString config.fonts.fonts} -regex "$font_regexp" \
-exec ln -sf -t "$out/share/X11/fonts" '{}' \;
cd "$out/share/X11/fonts"
${optionalString cfg.decompressFonts ''
···
x11Fonts = pkgs.runCommand "X11-fonts" { preferLocalBuild = true; } ''
mkdir -p "$out/share/X11/fonts"
font_regexp='.*\.\(ttf\|ttc\|otb\|otf\|pcf\|pfa\|pfb\|bdf\)\(\.gz\)?'
+
find ${toString config.fonts.packages} -regex "$font_regexp" \
-exec ln -sf -t "$out/share/X11/fonts" '{}' \;
cd "$out/share/X11/fonts"
${optionalString cfg.decompressFonts ''
+1 -1
nixos/modules/config/fonts/ghostscript.nix
···
config = mkIf config.fonts.enableGhostscriptFonts {
-
fonts.fonts = [ "${pkgs.ghostscript}/share/ghostscript/fonts" ];
};
···
config = mkIf config.fonts.enableGhostscriptFonts {
+
fonts.packages = [ "${pkgs.ghostscript}/share/ghostscript/fonts" ];
};
+1 -1
nixos/modules/services/monitoring/munin.nix
···
# Munin is hardcoded to use DejaVu Mono and the graphs come out wrong if
# it's not available.
-
fonts.fonts = [ pkgs.dejavu_fonts ];
systemd.timers.munin-cron = {
description = "batch Munin master programs";
···
# Munin is hardcoded to use DejaVu Mono and the graphs come out wrong if
# it's not available.
+
fonts.packages = [ pkgs.dejavu_fonts ];
systemd.timers.munin-cron = {
description = "batch Munin master programs";
+1 -1
nixos/modules/services/ttys/kmscon.nix
···
fonts = mkIf (cfg.fonts != null) {
fontconfig.enable = true;
-
fonts = map (f: f.package) cfg.fonts;
};
};
}
···
fonts = mkIf (cfg.fonts != null) {
fontconfig.enable = true;
+
packages = map (f: f.package) cfg.fonts;
};
};
}
+1 -1
nixos/modules/services/x11/desktop-managers/budgie.nix
···
++ cfg.sessionPath;
# Fonts.
-
fonts.fonts = mkDefault [
pkgs.noto-fonts
pkgs.hack-font
];
···
++ cfg.sessionPath;
# Fonts.
+
fonts.packages = mkDefault [
pkgs.noto-fonts
pkgs.hack-font
];
+1 -1
nixos/modules/services/x11/desktop-managers/cinnamon.nix
···
qt.style = "adwaita";
# Default Fonts
-
fonts.fonts = with pkgs; [
source-code-pro # Default monospace font in 3.32
ubuntu_font_family # required for default theme
];
···
qt.style = "adwaita";
# Default Fonts
+
fonts.packages = with pkgs; [
source-code-pro # Default monospace font in 3.32
ubuntu_font_family # required for default theme
];
+1 -1
nixos/modules/services/x11/desktop-managers/deepin.nix
···
networking.networkmanager.enable = mkDefault true;
programs.dconf.enable = mkDefault true;
-
fonts.fonts = with pkgs; [ noto-fonts ];
xdg.mime.enable = true;
xdg.menus.enable = true;
xdg.icons.enable = true;
···
networking.networkmanager.enable = mkDefault true;
programs.dconf.enable = mkDefault true;
+
fonts.packages = with pkgs; [ noto-fonts ];
xdg.mime.enable = true;
xdg.menus.enable = true;
xdg.icons.enable = true;
+1 -1
nixos/modules/services/x11/desktop-managers/enlightenment.nix
···
environment.etc."X11/xkb".source = xcfg.xkbDir;
-
fonts.fonts = [ pkgs.dejavu_fonts pkgs.ubuntu_font_family ];
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
···
environment.etc."X11/xkb".source = xcfg.xkbDir;
+
fonts.packages = [ pkgs.dejavu_fonts pkgs.ubuntu_font_family ];
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
+1 -1
nixos/modules/services/x11/desktop-managers/gnome.nix
···
isSystem = true;
};
-
fonts.fonts = with pkgs; [
cantarell-fonts
dejavu_fonts
source-code-pro # Default monospace font in 3.32
···
isSystem = true;
};
+
fonts.packages = with pkgs; [
cantarell-fonts
dejavu_fonts
source-code-pro # Default monospace font in 3.32
+2 -2
nixos/modules/services/x11/desktop-managers/pantheon.nix
···
qt.style = "adwaita";
# Default Fonts
-
fonts.fonts = with pkgs; [
inter
open-dyslexic
open-sans
···
])) config.environment.pantheon.excludePackages;
# needed by screenshot
-
fonts.fonts = [
pkgs.pantheon.elementary-redacted-script
];
})
···
qt.style = "adwaita";
# Default Fonts
+
fonts.packages = with pkgs; [
inter
open-dyslexic
open-sans
···
])) config.environment.pantheon.excludePackages;
# needed by screenshot
+
fonts.packages = [
pkgs.pantheon.elementary-redacted-script
];
})
+1 -1
nixos/modules/services/x11/desktop-managers/plasma5.nix
···
# Enable GTK applications to load SVG icons
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
-
fonts.fonts = with pkgs; [ cfg.notoPackage hack-font ];
fonts.fontconfig.defaultFonts = {
monospace = [ "Hack" "Noto Sans Mono" ];
sansSerif = [ "Noto Sans" ];
···
# Enable GTK applications to load SVG icons
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
+
fonts.packages = with pkgs; [ cfg.notoPackage hack-font ];
fonts.fontconfig.defaultFonts = {
monospace = [ "Hack" "Noto Sans Mono" ];
sansSerif = [ "Noto Sans" ];
+1 -1
nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix
···
theme
];
-
fonts.fonts = [ font ];
environment.etc."lightdm/slick-greeter.conf".source = slickGreeterConf;
};
···
theme
];
+
fonts.packages = [ font ];
environment.etc."lightdm/slick-greeter.conf".source = slickGreeterConf;
};
+2 -2
nixos/modules/services/x11/xserver.nix
···
};
fontsForXServer =
-
config.fonts.fonts ++
# We don't want these fonts in fonts.conf, because then modern,
# fontconfig-based applications will get horrible bitmapped
# Helvetica fonts. It's better to get a substitution (like Nimbus
···
'';
fonts.enableDefaultFonts = mkDefault true;
-
fonts.fonts = [
(if cfg.upscaleDefaultCursor then fontcursormisc_hidpi else pkgs.xorg.fontcursormisc)
pkgs.xorg.fontmiscmisc
];
···
};
fontsForXServer =
+
config.fonts.packages ++
# We don't want these fonts in fonts.conf, because then modern,
# fontconfig-based applications will get horrible bitmapped
# Helvetica fonts. It's better to get a substitution (like Nimbus
···
'';
fonts.enableDefaultFonts = mkDefault true;
+
fonts.packages = [
(if cfg.upscaleDefaultCursor then fontcursormisc_hidpi else pkgs.xorg.fontcursormisc)
pkgs.xorg.fontmiscmisc
];
+1 -1
nixos/tests/cage.nix
···
{
imports = [ ./common/user-account.nix ];
-
fonts.fonts = with pkgs; [ dejavu_fonts ];
services.cage = {
enable = true;
···
{
imports = [ ./common/user-account.nix ];
+
fonts.packages = with pkgs; [ dejavu_fonts ];
services.cage = {
enable = true;
+1 -1
nixos/tests/cups-pdf.nix
···
nodes.machine = { pkgs, ... }: {
imports = [ ./common/user-account.nix ];
environment.systemPackages = [ pkgs.poppler_utils ];
-
fonts.fonts = [ pkgs.dejavu_fonts ]; # yields more OCR-able pdf
services.printing.cups-pdf.enable = true;
services.printing.cups-pdf.instances = {
opt = {};
···
nodes.machine = { pkgs, ... }: {
imports = [ ./common/user-account.nix ];
environment.systemPackages = [ pkgs.poppler_utils ];
+
fonts.packages = [ pkgs.dejavu_fonts ]; # yields more OCR-able pdf
services.printing.cups-pdf.enable = true;
services.printing.cups-pdf.instances = {
opt = {};
+1 -1
nixos/tests/fontconfig-default-fonts.nix
···
nodes.machine = { config, pkgs, ... }: {
fonts.enableDefaultFonts = true; # Background fonts
-
fonts.fonts = with pkgs; [
noto-fonts-emoji
cantarell-fonts
twitter-color-emoji
···
nodes.machine = { config, pkgs, ... }: {
fonts.enableDefaultFonts = true; # Background fonts
+
fonts.packages = with pkgs; [
noto-fonts-emoji
cantarell-fonts
twitter-color-emoji
+1 -1
nixos/tests/miriway.nix
···
};
};
-
fonts.fonts = [ pkgs.inconsolata ];
};
enableOCR = true;
···
};
};
+
fonts.packages = [ pkgs.inconsolata ];
};
enableOCR = true;
+1 -1
nixos/tests/sway.nix
···
'';
};
-
fonts.fonts = [ pkgs.inconsolata ];
# Automatically configure and start Sway when logging in on tty1:
programs.bash.loginShellInit = ''
···
'';
};
+
fonts.packages = [ pkgs.inconsolata ];
# Automatically configure and start Sway when logging in on tty1:
programs.bash.loginShellInit = ''
+1 -1
nixos/tests/vscodium.nix
···
environment.variables.NIXOS_OZONE_WL = "1";
environment.variables.DISPLAY = "do not use";
-
fonts.fonts = with pkgs; [ dejavu_fonts ];
};
xorg = { pkgs, ... }: {
imports = [ ./common/user-account.nix ./common/x11.nix ];
···
environment.variables.NIXOS_OZONE_WL = "1";
environment.variables.DISPLAY = "do not use";
+
fonts.packages = with pkgs; [ dejavu_fonts ];
};
xorg = { pkgs, ... }: {
imports = [ ./common/user-account.nix ./common/x11.nix ];
+1 -1
pkgs/tools/typesetting/tex/texlive/combine.nix
···
passthru = {
# This is set primarily to help find-tarballs.nix to do its job
packages = pkgList.all;
-
# useful for inclusion in the `fonts.fonts` nixos option or for use in devshells
fonts = "${texmfroot}/texmf-dist/fonts";
};
···
passthru = {
# This is set primarily to help find-tarballs.nix to do its job
packages = pkgList.all;
+
# useful for inclusion in the `fonts.packages` nixos option or for use in devshells
fonts = "${texmfroot}/texmf-dist/fonts";
};