2014-04-06 19:20:45 +00:00
|
|
|
# AccountsService daemon.
|
|
|
|
|
2014-04-14 14:26:48 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2014-04-06 19:20:45 +00:00
|
|
|
|
2014-04-14 14:26:48 +00:00
|
|
|
with lib;
|
2014-04-06 19:20:45 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
|
2020-04-02 00:16:24 +00:00
|
|
|
meta = {
|
|
|
|
maintainers = teams.freedesktop.members;
|
|
|
|
};
|
|
|
|
|
2014-04-06 19:20:45 +00:00
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.accounts-daemon = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Whether to enable AccountsService, a DBus service for accessing
|
|
|
|
the list of user accounts and information attached to those accounts.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = mkIf config.services.accounts-daemon.enable {
|
|
|
|
|
2014-06-22 19:03:19 +00:00
|
|
|
environment.systemPackages = [ pkgs.accountsservice ];
|
2014-04-06 19:20:45 +00:00
|
|
|
|
2018-08-16 08:56:44 +00:00
|
|
|
# Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice
|
|
|
|
environment.pathsToLink = [ "/share/accountsservice" ];
|
|
|
|
|
2014-06-22 19:03:19 +00:00
|
|
|
services.dbus.packages = [ pkgs.accountsservice ];
|
2014-04-06 19:20:45 +00:00
|
|
|
|
2014-06-22 19:03:19 +00:00
|
|
|
systemd.packages = [ pkgs.accountsservice ];
|
2016-06-01 11:02:26 +00:00
|
|
|
|
2018-11-18 15:55:00 +00:00
|
|
|
systemd.services.accounts-daemon = recursiveUpdate {
|
2016-06-01 11:02:26 +00:00
|
|
|
|
|
|
|
wantedBy = [ "graphical.target" ];
|
|
|
|
|
2018-08-16 08:56:44 +00:00
|
|
|
# Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice
|
|
|
|
environment.XDG_DATA_DIRS = "${config.system.path}/share";
|
|
|
|
|
2018-11-18 15:55:00 +00:00
|
|
|
} (optionalAttrs (!config.users.mutableUsers) {
|
2016-06-01 11:02:26 +00:00
|
|
|
environment.NIXOS_USERS_PURE = "true";
|
|
|
|
});
|
2014-04-06 19:20:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|