29027fd1e1
Using pkgs.lib on the spine of module evaluation is problematic because the pkgs argument depends on the result of module evaluation. To prevent an infinite recursion, pkgs and some of the modules are evaluated twice, which is inefficient. Using ‘with lib’ prevents this problem.
40 lines
625 B
Nix
40 lines
625 B
Nix
# at-spi2-core daemon.
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
services.gnome3.at-spi2-core = {
|
|
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = ''
|
|
Whether to enable at-spi2-core, a service for the Assistive Technologies
|
|
available on the GNOME platform.
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
###### implementation
|
|
|
|
config = mkIf config.services.gnome3.at-spi2-core.enable {
|
|
|
|
environment.systemPackages = [ pkgs.gnome3.at_spi2_core ];
|
|
|
|
services.dbus.packages = [ pkgs.gnome3.at_spi2_core ];
|
|
|
|
};
|
|
|
|
}
|