Merge pull request #25892 from abbradar/xresources

Streamline DPI settings

Changed files
+20 -19
nixos
doc
manual
from_md
release-notes
release-notes
modules
config
services
x11
display-managers
+10
nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
···
</listitem>
<listitem>
<para>
+
The fontconfig service’s dpi option has been removed.
+
Fontconfig should use Xft settings by default so there’s no
+
need to override one value in multiple places. The user can
+
set DPI via ~/.Xresources properly, or at the system level per
+
monitor, or as a last resort at the system level with
+
<literal>services.xserver.dpi</literal>.
+
</para>
+
</listitem>
+
<listitem>
+
<para>
The <literal>yambar</literal> package has been split into
<literal>yambar</literal> and
<literal>yambar-wayland</literal>, corresponding to the xorg
+4
nixos/doc/manual/release-notes/rl-2111.section.md
···
- The `openrazer` and `openrazer-daemon` packages as well as the `hardware.openrazer` module now require users to be members of the `openrazer` group instead of `plugdev`. With this change, users no longer need be granted the entire set of `plugdev` group permissions, which can include permissions other than those required by `openrazer`. This is desirable from a security point of view. The setting [`harware.openrazer.users`](options.html#opt-services.hardware.openrazer.users) can be used to add users to the `openrazer` group.
+
- The fontconfig service's dpi option has been removed.
+
Fontconfig should use Xft settings by default so there's no need to override one value in multiple places.
+
The user can set DPI via ~/.Xresources properly, or at the system level per monitor, or as a last resort at the system level with `services.xserver.dpi`.
+
- The `yambar` package has been split into `yambar` and `yambar-wayland`, corresponding to the xorg and wayland backend respectively. Please switch to `yambar-wayland` if you are on wayland.
- The `services.minio` module gained an additional option `consoleAddress`, that
+1 -17
nixos/modules/config/fonts/fontconfig.nix
···
</edit>
</match>
-
${optionalString (cfg.dpi != 0) ''
-
<match target="pattern">
-
<edit name="dpi" mode="assign">
-
<double>${toString cfg.dpi}</double>
-
</edit>
-
</match>
-
''}
-
</fontconfig>
'';
···
(mkRemovedOptionModule [ "fonts" "fontconfig" "hinting" "style" ] "")
(mkRemovedOptionModule [ "fonts" "fontconfig" "forceAutohint" ] "")
(mkRemovedOptionModule [ "fonts" "fontconfig" "renderMonoTTFAsBitmap" ] "")
+
(mkRemovedOptionModule [ "fonts" "fontconfig" "dpi" ] "Use display server-specific options")
] ++ lib.forEach [ "enable" "substitutions" "preset" ]
(opt: lib.mkRemovedOptionModule [ "fonts" "fontconfig" "ultimate" "${opt}" ] ''
The fonts.fontconfig.ultimate module and configuration is obsolete.
···
Enable font antialiasing. At high resolution (> 200 DPI),
antialiasing has no visible effect; users of such displays may want
to disable this option.
-
'';
-
};
-
-
dpi = mkOption {
-
type = types.int;
-
default = 0;
-
description = ''
-
Force DPI setting. Setting to <literal>0</literal> disables DPI
-
forcing; the DPI detected for the display will be used.
'';
};
-1
nixos/modules/services/x11/display-managers/default.nix
···
fontconfig = config.fonts.fontconfig;
xresourcesXft = pkgs.writeText "Xresources-Xft" ''
-
${optionalString (fontconfig.dpi != 0) ''Xft.dpi: ${toString fontconfig.dpi}''}
Xft.antialias: ${if fontconfig.antialias then "1" else "0"}
Xft.rgba: ${fontconfig.subpixel.rgba}
Xft.lcdfilter: lcd${fontconfig.subpixel.lcdfilter}
+5 -1
nixos/modules/services/x11/xserver.nix
···
dpi = mkOption {
type = types.nullOr types.int;
default = null;
-
description = "DPI resolution to use for X server.";
+
description = ''
+
Force global DPI resolution to use for X server. It's recommended to
+
use this only when DPI is detected incorrectly; also consider using
+
<literal>Monitor</literal> section in configuration file instead.
+
'';
};
updateDbusEnvironment = mkOption {