1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/nixos/modules/services/desktops/accountsservice.nix
2018-08-16 18:00:58 +09:00

49 lines
882 B
Nix

# AccountsService daemon.
{ config, lib, pkgs, ... }:
with lib;
{
###### 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 {
environment.systemPackages = [ pkgs.accountsservice ];
services.dbus.packages = [ pkgs.accountsservice ];
systemd.packages = [ pkgs.accountsservice ];
systemd.services.accounts-daemon = {
wantedBy = [ "graphical.target" ];
} // (optionalAttrs (!config.users.mutableUsers) {
environment.NIXOS_USERS_PURE = "true";
});
};
}