From 7fbdd7fcf4242f406182c4b2671f25e1d2c86397 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 16 Aug 2018 17:56:44 +0900 Subject: [PATCH] lightdm: enable the accounts daemon to find dbus interface --- nixos/modules/services/desktops/accountsservice.nix | 6 ++++++ nixos/modules/services/x11/display-managers/lightdm.nix | 3 +++ 2 files changed, 9 insertions(+) diff --git a/nixos/modules/services/desktops/accountsservice.nix b/nixos/modules/services/desktops/accountsservice.nix index a19ac2a50c2d..933b9da2c83c 100644 --- a/nixos/modules/services/desktops/accountsservice.nix +++ b/nixos/modules/services/desktops/accountsservice.nix @@ -32,6 +32,9 @@ with lib; environment.systemPackages = [ pkgs.accountsservice ]; + # Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice + environment.pathsToLink = [ "/share/accountsservice" ]; + services.dbus.packages = [ pkgs.accountsservice ]; systemd.packages = [ pkgs.accountsservice ]; @@ -40,6 +43,9 @@ with lib; wantedBy = [ "graphical.target" ]; + # Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice + environment.XDG_DATA_DIRS = "${config.system.path}/share"; + } // (optionalAttrs (!config.users.mutableUsers) { environment.NIXOS_USERS_PURE = "true"; }); diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix index 06f017e9bf47..dc82f7086c82 100644 --- a/nixos/modules/services/x11/display-managers/lightdm.nix +++ b/nixos/modules/services/x11/display-managers/lightdm.nix @@ -212,6 +212,9 @@ in # lightdm uses the accounts daemon to remember language/window-manager per user services.accounts-daemon.enable = true; + # Enable the accounts daemon to find lightdm's dbus interface + environment.systemPackages = [ lightdm ]; + security.pam.services.lightdm = { allowNullPassword = true; startSession = true;