mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
treewide: rename fonts.fonts to fonts.packages
This commit is contained in:
parent
5162df3239
commit
b0c67b4b6e
@ -34,5 +34,7 @@ The `ibus-engines.typing-booster` package contains a program named `emoji-picker
|
|||||||
On NixOS, it can be installed using the following expression:
|
On NixOS, it can be installed using the following expression:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ pkgs, ... }: { fonts.fonts = with pkgs; [ noto-fonts-emoji ]; }
|
{ pkgs, ... }: {
|
||||||
|
fonts.packages = with pkgs; [ noto-fonts-emoji ];
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
@ -42,7 +42,7 @@ let
|
|||||||
# looking things up.
|
# looking things up.
|
||||||
makeCacheConf = { }:
|
makeCacheConf = { }:
|
||||||
let
|
let
|
||||||
makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.fonts; };
|
makeCache = fontconfig: pkgs.makeFontsCache { inherit fontconfig; fontDirectories = config.fonts.packages; };
|
||||||
cache = makeCache pkgs.fontconfig;
|
cache = makeCache pkgs.fontconfig;
|
||||||
cache32 = makeCache pkgs.pkgsi686Linux.fontconfig;
|
cache32 = makeCache pkgs.pkgsi686Linux.fontconfig;
|
||||||
in
|
in
|
||||||
@ -51,7 +51,7 @@ let
|
|||||||
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
|
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
|
||||||
<fontconfig>
|
<fontconfig>
|
||||||
<!-- Font directories -->
|
<!-- Font directories -->
|
||||||
${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)}
|
${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.packages)}
|
||||||
${optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) ''
|
${optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) ''
|
||||||
<!-- Pre-generated font caches -->
|
<!-- Pre-generated font caches -->
|
||||||
<cachedir>${cache}</cachedir>
|
<cachedir>${cache}</cachedir>
|
||||||
|
@ -9,7 +9,7 @@ let
|
|||||||
x11Fonts = pkgs.runCommand "X11-fonts" { preferLocalBuild = true; } ''
|
x11Fonts = pkgs.runCommand "X11-fonts" { preferLocalBuild = true; } ''
|
||||||
mkdir -p "$out/share/X11/fonts"
|
mkdir -p "$out/share/X11/fonts"
|
||||||
font_regexp='.*\.\(ttf\|ttc\|otb\|otf\|pcf\|pfa\|pfb\|bdf\)\(\.gz\)?'
|
font_regexp='.*\.\(ttf\|ttc\|otb\|otf\|pcf\|pfa\|pfb\|bdf\)\(\.gz\)?'
|
||||||
find ${toString config.fonts.fonts} -regex "$font_regexp" \
|
find ${toString config.fonts.packages} -regex "$font_regexp" \
|
||||||
-exec ln -sf -t "$out/share/X11/fonts" '{}' \;
|
-exec ln -sf -t "$out/share/X11/fonts" '{}' \;
|
||||||
cd "$out/share/X11/fonts"
|
cd "$out/share/X11/fonts"
|
||||||
${optionalString cfg.decompressFonts ''
|
${optionalString cfg.decompressFonts ''
|
||||||
|
@ -26,7 +26,7 @@ with lib;
|
|||||||
|
|
||||||
config = mkIf config.fonts.enableGhostscriptFonts {
|
config = mkIf config.fonts.enableGhostscriptFonts {
|
||||||
|
|
||||||
fonts.fonts = [ "${pkgs.ghostscript}/share/ghostscript/fonts" ];
|
fonts.packages = [ "${pkgs.ghostscript}/share/ghostscript/fonts" ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -375,7 +375,7 @@ in
|
|||||||
|
|
||||||
# Munin is hardcoded to use DejaVu Mono and the graphs come out wrong if
|
# Munin is hardcoded to use DejaVu Mono and the graphs come out wrong if
|
||||||
# it's not available.
|
# it's not available.
|
||||||
fonts.fonts = [ pkgs.dejavu_fonts ];
|
fonts.packages = [ pkgs.dejavu_fonts ];
|
||||||
|
|
||||||
systemd.timers.munin-cron = {
|
systemd.timers.munin-cron = {
|
||||||
description = "batch Munin master programs";
|
description = "batch Munin master programs";
|
||||||
|
@ -111,7 +111,7 @@ in {
|
|||||||
|
|
||||||
fonts = mkIf (cfg.fonts != null) {
|
fonts = mkIf (cfg.fonts != null) {
|
||||||
fontconfig.enable = true;
|
fontconfig.enable = true;
|
||||||
fonts = map (f: f.package) cfg.fonts;
|
packages = map (f: f.package) cfg.fonts;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ in {
|
|||||||
++ cfg.sessionPath;
|
++ cfg.sessionPath;
|
||||||
|
|
||||||
# Fonts.
|
# Fonts.
|
||||||
fonts.fonts = mkDefault [
|
fonts.packages = mkDefault [
|
||||||
pkgs.noto-fonts
|
pkgs.noto-fonts
|
||||||
pkgs.hack-font
|
pkgs.hack-font
|
||||||
];
|
];
|
||||||
|
@ -218,7 +218,7 @@ in
|
|||||||
qt.style = "adwaita";
|
qt.style = "adwaita";
|
||||||
|
|
||||||
# Default Fonts
|
# Default Fonts
|
||||||
fonts.fonts = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
source-code-pro # Default monospace font in 3.32
|
source-code-pro # Default monospace font in 3.32
|
||||||
ubuntu_font_family # required for default theme
|
ubuntu_font_family # required for default theme
|
||||||
];
|
];
|
||||||
|
@ -67,7 +67,7 @@ in
|
|||||||
networking.networkmanager.enable = mkDefault true;
|
networking.networkmanager.enable = mkDefault true;
|
||||||
programs.dconf.enable = mkDefault true;
|
programs.dconf.enable = mkDefault true;
|
||||||
|
|
||||||
fonts.fonts = with pkgs; [ noto-fonts ];
|
fonts.packages = with pkgs; [ noto-fonts ];
|
||||||
xdg.mime.enable = true;
|
xdg.mime.enable = true;
|
||||||
xdg.menus.enable = true;
|
xdg.menus.enable = true;
|
||||||
xdg.icons.enable = true;
|
xdg.icons.enable = true;
|
||||||
|
@ -92,7 +92,7 @@ in
|
|||||||
|
|
||||||
environment.etc."X11/xkb".source = xcfg.xkbDir;
|
environment.etc."X11/xkb".source = xcfg.xkbDir;
|
||||||
|
|
||||||
fonts.fonts = [ pkgs.dejavu_fonts pkgs.ubuntu_font_family ];
|
fonts.packages = [ pkgs.dejavu_fonts pkgs.ubuntu_font_family ];
|
||||||
|
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
services.upower.enable = config.powerManagement.enable;
|
services.upower.enable = config.powerManagement.enable;
|
||||||
|
@ -432,7 +432,7 @@ in
|
|||||||
isSystem = true;
|
isSystem = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.fonts = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
cantarell-fonts
|
cantarell-fonts
|
||||||
dejavu_fonts
|
dejavu_fonts
|
||||||
source-code-pro # Default monospace font in 3.32
|
source-code-pro # Default monospace font in 3.32
|
||||||
|
@ -265,7 +265,7 @@ in
|
|||||||
qt.style = "adwaita";
|
qt.style = "adwaita";
|
||||||
|
|
||||||
# Default Fonts
|
# Default Fonts
|
||||||
fonts.fonts = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
inter
|
inter
|
||||||
open-dyslexic
|
open-dyslexic
|
||||||
open-sans
|
open-sans
|
||||||
@ -306,7 +306,7 @@ in
|
|||||||
])) config.environment.pantheon.excludePackages;
|
])) config.environment.pantheon.excludePackages;
|
||||||
|
|
||||||
# needed by screenshot
|
# needed by screenshot
|
||||||
fonts.fonts = [
|
fonts.packages = [
|
||||||
pkgs.pantheon.elementary-redacted-script
|
pkgs.pantheon.elementary-redacted-script
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
@ -332,7 +332,7 @@ in
|
|||||||
# Enable GTK applications to load SVG icons
|
# Enable GTK applications to load SVG icons
|
||||||
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
|
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
|
||||||
|
|
||||||
fonts.fonts = with pkgs; [ cfg.notoPackage hack-font ];
|
fonts.packages = with pkgs; [ cfg.notoPackage hack-font ];
|
||||||
fonts.fontconfig.defaultFonts = {
|
fonts.fontconfig.defaultFonts = {
|
||||||
monospace = [ "Hack" "Noto Sans Mono" ];
|
monospace = [ "Hack" "Noto Sans Mono" ];
|
||||||
sansSerif = [ "Noto Sans" ];
|
sansSerif = [ "Noto Sans" ];
|
||||||
|
@ -142,7 +142,7 @@ in
|
|||||||
theme
|
theme
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fonts = [ font ];
|
fonts.packages = [ font ];
|
||||||
|
|
||||||
environment.etc."lightdm/slick-greeter.conf".source = slickGreeterConf;
|
environment.etc."lightdm/slick-greeter.conf".source = slickGreeterConf;
|
||||||
};
|
};
|
||||||
|
@ -22,7 +22,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
fontsForXServer =
|
fontsForXServer =
|
||||||
config.fonts.fonts ++
|
config.fonts.packages ++
|
||||||
# We don't want these fonts in fonts.conf, because then modern,
|
# We don't want these fonts in fonts.conf, because then modern,
|
||||||
# fontconfig-based applications will get horrible bitmapped
|
# fontconfig-based applications will get horrible bitmapped
|
||||||
# Helvetica fonts. It's better to get a substitution (like Nimbus
|
# Helvetica fonts. It's better to get a substitution (like Nimbus
|
||||||
@ -884,7 +884,7 @@ in
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
fonts.enableDefaultFonts = mkDefault true;
|
fonts.enableDefaultFonts = mkDefault true;
|
||||||
fonts.fonts = [
|
fonts.packages = [
|
||||||
(if cfg.upscaleDefaultCursor then fontcursormisc_hidpi else pkgs.xorg.fontcursormisc)
|
(if cfg.upscaleDefaultCursor then fontcursormisc_hidpi else pkgs.xorg.fontcursormisc)
|
||||||
pkgs.xorg.fontmiscmisc
|
pkgs.xorg.fontmiscmisc
|
||||||
];
|
];
|
||||||
|
@ -11,7 +11,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
|
|||||||
{
|
{
|
||||||
imports = [ ./common/user-account.nix ];
|
imports = [ ./common/user-account.nix ];
|
||||||
|
|
||||||
fonts.fonts = with pkgs; [ dejavu_fonts ];
|
fonts.packages = with pkgs; [ dejavu_fonts ];
|
||||||
|
|
||||||
services.cage = {
|
services.cage = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -4,7 +4,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: {
|
|||||||
nodes.machine = { pkgs, ... }: {
|
nodes.machine = { pkgs, ... }: {
|
||||||
imports = [ ./common/user-account.nix ];
|
imports = [ ./common/user-account.nix ];
|
||||||
environment.systemPackages = [ pkgs.poppler_utils ];
|
environment.systemPackages = [ pkgs.poppler_utils ];
|
||||||
fonts.fonts = [ pkgs.dejavu_fonts ]; # yields more OCR-able pdf
|
fonts.packages = [ pkgs.dejavu_fonts ]; # yields more OCR-able pdf
|
||||||
services.printing.cups-pdf.enable = true;
|
services.printing.cups-pdf.enable = true;
|
||||||
services.printing.cups-pdf.instances = {
|
services.printing.cups-pdf.instances = {
|
||||||
opt = {};
|
opt = {};
|
||||||
|
@ -8,7 +8,7 @@ import ./make-test-python.nix ({ lib, ... }:
|
|||||||
|
|
||||||
nodes.machine = { config, pkgs, ... }: {
|
nodes.machine = { config, pkgs, ... }: {
|
||||||
fonts.enableDefaultFonts = true; # Background fonts
|
fonts.enableDefaultFonts = true; # Background fonts
|
||||||
fonts.fonts = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
cantarell-fonts
|
cantarell-fonts
|
||||||
twitter-color-emoji
|
twitter-color-emoji
|
||||||
|
@ -83,7 +83,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.fonts = [ pkgs.inconsolata ];
|
fonts.packages = [ pkgs.inconsolata ];
|
||||||
};
|
};
|
||||||
|
|
||||||
enableOCR = true;
|
enableOCR = true;
|
||||||
|
@ -51,7 +51,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.fonts = [ pkgs.inconsolata ];
|
fonts.packages = [ pkgs.inconsolata ];
|
||||||
|
|
||||||
# Automatically configure and start Sway when logging in on tty1:
|
# Automatically configure and start Sway when logging in on tty1:
|
||||||
programs.bash.loginShellInit = ''
|
programs.bash.loginShellInit = ''
|
||||||
|
@ -8,7 +8,7 @@ let
|
|||||||
environment.variables.NIXOS_OZONE_WL = "1";
|
environment.variables.NIXOS_OZONE_WL = "1";
|
||||||
environment.variables.DISPLAY = "do not use";
|
environment.variables.DISPLAY = "do not use";
|
||||||
|
|
||||||
fonts.fonts = with pkgs; [ dejavu_fonts ];
|
fonts.packages = with pkgs; [ dejavu_fonts ];
|
||||||
};
|
};
|
||||||
xorg = { pkgs, ... }: {
|
xorg = { pkgs, ... }: {
|
||||||
imports = [ ./common/user-account.nix ./common/x11.nix ];
|
imports = [ ./common/user-account.nix ./common/x11.nix ];
|
||||||
|
@ -103,7 +103,7 @@ in (buildEnv {
|
|||||||
passthru = {
|
passthru = {
|
||||||
# This is set primarily to help find-tarballs.nix to do its job
|
# This is set primarily to help find-tarballs.nix to do its job
|
||||||
packages = pkgList.all;
|
packages = pkgList.all;
|
||||||
# useful for inclusion in the `fonts.fonts` nixos option or for use in devshells
|
# useful for inclusion in the `fonts.packages` nixos option or for use in devshells
|
||||||
fonts = "${texmfroot}/texmf-dist/fonts";
|
fonts = "${texmfroot}/texmf-dist/fonts";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user