From 83793ca8980283a6f62c028ebed336b9d1bbf80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 24 Jul 2023 17:33:39 +0200 Subject: [PATCH] nixos/fonts: rename fonts.enableDefaultFonts to fonts.enableDefaultPackages to better fit the renamed fonts.packages --- nixos/doc/manual/release-notes/rl-2311.section.md | 2 +- nixos/modules/config/fonts/packages.nix | 5 +++-- nixos/modules/programs/hyprland.nix | 2 +- nixos/modules/programs/miriway.nix | 2 +- nixos/modules/programs/wayland/wayland-session.nix | 2 +- nixos/modules/services/networking/xrdp.nix | 2 +- nixos/modules/services/x11/xserver.nix | 2 +- nixos/tests/fontconfig-default-fonts.nix | 2 +- nixos/tests/noto-fonts-cjk-qt-default-weight.nix | 2 +- nixos/tests/noto-fonts.nix | 2 +- 10 files changed, 12 insertions(+), 11 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 3fd8b5b6a2e5..95013c6aac15 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -121,7 +121,7 @@ - `buildGoModule` `go-modules` attrs have been renamed to `goModules`. -- The `fonts.fonts` option has been renamed to `fonts.packages`. +- The `fonts.fonts` and `fonts.enableDefaultFonts` options have been renamed to `fonts.packages` and `fonts.enableDefaultPackages` respectively. - `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. diff --git a/nixos/modules/config/fonts/packages.nix b/nixos/modules/config/fonts/packages.nix index cedac766fc6e..8929539b921e 100644 --- a/nixos/modules/config/fonts/packages.nix +++ b/nixos/modules/config/fonts/packages.nix @@ -6,6 +6,7 @@ in { imports = [ (lib.mkRemovedOptionModule [ "fonts" "enableCoreFonts" ] "Use fonts.packages = [ pkgs.corefonts ]; instead.") + (lib.mkRenamedOptionModule [ "fonts" "enableDefaultFonts " ] [ "fonts" "enableDefaultPackages" ]) (lib.mkRenamedOptionModule [ "fonts" "fonts" ] [ "fonts" "packages" ]) ]; @@ -18,7 +19,7 @@ in description = lib.mdDoc "List of primary font packages."; }; - enableDefaultFonts = lib.mkOption { + enableDefaultPackages = lib.mkOption { type = lib.types.bool; default = false; description = lib.mdDoc '' @@ -30,7 +31,7 @@ in }; config = { - fonts.packages = lib.mkIf cfg.enableDefaultFonts (with pkgs; [ + fonts.packages = lib.mkIf cfg.enableDefaultPackages (with pkgs; [ dejavu_fonts freefont_ttf gyre-fonts # TrueType substitutes for standard PostScript fonts diff --git a/nixos/modules/programs/hyprland.nix b/nixos/modules/programs/hyprland.nix index d79680f63f16..faeaa8973fa9 100644 --- a/nixos/modules/programs/hyprland.nix +++ b/nixos/modules/programs/hyprland.nix @@ -60,7 +60,7 @@ in config = mkIf cfg.enable { environment.systemPackages = [ cfg.finalPackage ]; - fonts.enableDefaultFonts = mkDefault true; + fonts.enableDefaultPackages = mkDefault true; hardware.opengl.enable = mkDefault true; programs = { diff --git a/nixos/modules/programs/miriway.nix b/nixos/modules/programs/miriway.nix index a67e1a17a7e6..e8a10770b6a3 100644 --- a/nixos/modules/programs/miriway.nix +++ b/nixos/modules/programs/miriway.nix @@ -66,7 +66,7 @@ in { }; hardware.opengl.enable = lib.mkDefault true; - fonts.enableDefaultFonts = lib.mkDefault true; + fonts.enableDefaultPackages = lib.mkDefault true; programs.dconf.enable = lib.mkDefault true; programs.xwayland.enable = lib.mkDefault true; diff --git a/nixos/modules/programs/wayland/wayland-session.nix b/nixos/modules/programs/wayland/wayland-session.nix index 3cbfef4d61de..da117ceae0ad 100644 --- a/nixos/modules/programs/wayland/wayland-session.nix +++ b/nixos/modules/programs/wayland/wayland-session.nix @@ -5,7 +5,7 @@ }; hardware.opengl.enable = mkDefault true; - fonts.enableDefaultFonts = mkDefault true; + fonts.enableDefaultPackages = mkDefault true; programs = { dconf.enable = mkDefault true; diff --git a/nixos/modules/services/networking/xrdp.nix b/nixos/modules/services/networking/xrdp.nix index ed7f1dadd370..218b440aab3c 100644 --- a/nixos/modules/services/networking/xrdp.nix +++ b/nixos/modules/services/networking/xrdp.nix @@ -121,7 +121,7 @@ in icons.enable = true; }; - fonts.enableDefaultFonts = mkDefault true; + fonts.enableDefaultPackages = mkDefault true; systemd = { services.xrdp = { diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 846434a71865..c2e6da4b453b 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -883,7 +883,7 @@ in ${cfg.extraConfig} ''; - fonts.enableDefaultFonts = mkDefault true; + fonts.enableDefaultPackages = mkDefault true; fonts.packages = [ (if cfg.upscaleDefaultCursor then fontcursormisc_hidpi else pkgs.xorg.fontcursormisc) pkgs.xorg.fontmiscmisc diff --git a/nixos/tests/fontconfig-default-fonts.nix b/nixos/tests/fontconfig-default-fonts.nix index d422e3ccc41a..d8c6ea0f721b 100644 --- a/nixos/tests/fontconfig-default-fonts.nix +++ b/nixos/tests/fontconfig-default-fonts.nix @@ -7,7 +7,7 @@ import ./make-test-python.nix ({ lib, ... }: ]; nodes.machine = { config, pkgs, ... }: { - fonts.enableDefaultFonts = true; # Background fonts + fonts.enableDefaultPackages = true; # Background fonts fonts.packages = with pkgs; [ noto-fonts-emoji cantarell-fonts diff --git a/nixos/tests/noto-fonts-cjk-qt-default-weight.nix b/nixos/tests/noto-fonts-cjk-qt-default-weight.nix index 678013cf3ab9..c2e0cb3adaeb 100644 --- a/nixos/tests/noto-fonts-cjk-qt-default-weight.nix +++ b/nixos/tests/noto-fonts-cjk-qt-default-weight.nix @@ -5,7 +5,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { nodes.machine = { imports = [ ./common/x11.nix ]; fonts = { - enableDefaultFonts = false; + enableDefaultPackages = false; fonts = [ pkgs.noto-fonts-cjk-sans ]; }; }; diff --git a/nixos/tests/noto-fonts.nix b/nixos/tests/noto-fonts.nix index 893522df24fe..edbb0db4cb7a 100644 --- a/nixos/tests/noto-fonts.nix +++ b/nixos/tests/noto-fonts.nix @@ -6,7 +6,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { imports = [ ./common/x11.nix ]; environment.systemPackages = [ pkgs.gedit ]; fonts = { - enableDefaultFonts = false; + enableDefaultPackages = false; fonts = with pkgs;[ noto-fonts noto-fonts-cjk-sans