1 # AccountsService daemon.
2 { config, lib, pkgs, ... }:
5 maintainers = lib.teams.freedesktop.members;
11 services.accounts-daemon = {
13 enable = lib.mkOption {
14 type = lib.types.bool;
17 Whether to enable AccountsService, a DBus service for accessing
18 the list of user accounts and information attached to those accounts.
27 config = lib.mkIf config.services.accounts-daemon.enable {
29 environment.systemPackages = [ pkgs.accountsservice ];
31 # Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice
32 environment.pathsToLink = [ "/share/accountsservice" ];
34 services.dbus.packages = [ pkgs.accountsservice ];
36 systemd.packages = [ pkgs.accountsservice ];
38 systemd.services.accounts-daemon = lib.recursiveUpdate {
40 wantedBy = [ "graphical.target" ];
42 # Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice
43 environment.XDG_DATA_DIRS = "${config.system.path}/share";
45 } (lib.optionalAttrs (!config.users.mutableUsers) {
46 environment.NIXOS_USERS_PURE = "true";