1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-23 09:51:00 +03:00
nixpkgs/nixos/modules/services/desktops/gnome/at-spi2-core.nix
Andy Chun @noneucat 2fedbbab9c nixos/gnome/at-spi2-core: force GTK_A11Y=none when disabled
GTK 4 applications use accessibility bus directly
and will try to connect to it every time a widget is created:
https://gitlab.gnome.org/GNOME/gtk/-/issues/4831

This will make GTK 4 apps (e.g. newly ported Nautilus) grind
to a halt on systems that do not have AT-SPI service installed.

Let’s explicitly disable accessibility support with an environment
variable when the AT-SPI service is not enabled to avoid that.
Just like we do for ATK-based applications with `NO_AT_BRIDGE`.

Fixes: https://github.com/NixOS/nixpkgs/issues/197188
2022-11-20 01:50:38 +01:00

60 lines
1.2 KiB
Nix

# at-spi2-core daemon.
{ config, lib, pkgs, ... }:
with lib;
{
meta = {
maintainers = teams.gnome.members;
};
###### interface
# Added 2021-05-07
imports = [
(mkRenamedOptionModule
[ "services" "gnome3" "at-spi2-core" "enable" ]
[ "services" "gnome" "at-spi2-core" "enable" ]
)
];
options = {
services.gnome.at-spi2-core = {
enable = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to enable at-spi2-core, a service for the Assistive Technologies
available on the GNOME platform.
Enable this if you get the error or warning
`The name org.a11y.Bus was not provided by any .service files`.
'';
};
};
};
###### implementation
config = mkMerge [
(mkIf config.services.gnome.at-spi2-core.enable {
environment.systemPackages = [ pkgs.at-spi2-core ];
services.dbus.packages = [ pkgs.at-spi2-core ];
systemd.packages = [ pkgs.at-spi2-core ];
})
(mkIf (!config.services.gnome.at-spi2-core.enable) {
environment.variables = {
NO_AT_BRIDGE = "1";
GTK_A11Y = "none";
};
})
];
}