diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 86bb87e91de..0b482dcda1b 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -96,6 +96,7 @@ ./services/databases/postgresql.nix ./services/databases/virtuoso.nix ./services/databases/monetdb.nix + ./services/desktops/accountservice.nix ./services/games/ghost-one.nix ./services/games/minecraft-server.nix ./services/hardware/acpid.nix diff --git a/nixos/modules/services/desktops/accountservice.nix b/nixos/modules/services/desktops/accountservice.nix new file mode 100644 index 00000000000..b21207f05a1 --- /dev/null +++ b/nixos/modules/services/desktops/accountservice.nix @@ -0,0 +1,40 @@ +# AccountsService daemon. + +{ config, pkgs, ... }: + +with pkgs.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.accountservice ]; + + services.dbus.packages = [ pkgs.accountservice ]; + + systemd.packages = [ pkgs.accountservice ]; + }; + +} diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 4f876b9b111..381ebc7ad29 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -22,6 +22,7 @@ in { # Enable helpful DBus services. security.polkit.enable = true; services.udisks2.enable = true; + services.accounts-daemon.enable = true; networking.networkmanager.enable = true; services.upower.enable = config.powerManagement.enable; diff --git a/pkgs/development/libraries/accountservice/default.nix b/pkgs/development/libraries/accountservice/default.nix index 8cab9e39e19..9734a6bc980 100644 --- a/pkgs/development/libraries/accountservice/default.nix +++ b/pkgs/development/libraries/accountservice/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, glib, intltool, libtool, gobjectIntrospection, polkit }: +{ stdenv, fetchurl, pkgconfig, glib, intltool +, libtool, gobjectIntrospection, polkit, systemd }: stdenv.mkDerivation rec { name = "accountsservice-0.6.35"; @@ -8,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "0f1hzl6hw56xvwgmd4yvmdyj15xj1fafw45pzv3qarww7h0wg8b5"; }; - buildInputs = [ pkgconfig glib intltool libtool gobjectIntrospection polkit ]; + buildInputs = [ pkgconfig glib intltool libtool + gobjectIntrospection polkit systemd ]; + configureFlags = [ "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ]; }