2014-04-06 20:20:45 +01:00
|
|
|
# AccountsService daemon.
|
|
|
|
|
2014-04-14 15:26:48 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2014-04-06 20:20:45 +01:00
|
|
|
|
2014-04-14 15:26:48 +01:00
|
|
|
with lib;
|
2014-04-06 20:20:45 +01: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 20:03:19 +01:00
|
|
|
environment.systemPackages = [ pkgs.accountsservice ];
|
2014-04-06 20:20:45 +01:00
|
|
|
|
2014-06-22 20:03:19 +01:00
|
|
|
services.dbus.packages = [ pkgs.accountsservice ];
|
2014-04-06 20:20:45 +01:00
|
|
|
|
2014-06-22 20:03:19 +01:00
|
|
|
systemd.packages = [ pkgs.accountsservice ];
|
2016-06-01 12:02:26 +01:00
|
|
|
|
|
|
|
systemd.services.accounts-daemon= {
|
|
|
|
|
|
|
|
wantedBy = [ "graphical.target" ];
|
|
|
|
|
|
|
|
} // (mkIf (!config.users.mutableUsers) {
|
|
|
|
environment.NIXOS_USERS_PURE = "true";
|
|
|
|
});
|
2014-04-06 20:20:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|