From 7952b51461c8ece7ebabe83e52ac682f2c179a01 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 16 Aug 2018 17:48:35 +0900 Subject: [PATCH 1/3] accountsservice: fix a bug --- nixos/modules/services/desktops/accountsservice.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/desktops/accountsservice.nix b/nixos/modules/services/desktops/accountsservice.nix index 2a7450669ea..a19ac2a50c2 100644 --- a/nixos/modules/services/desktops/accountsservice.nix +++ b/nixos/modules/services/desktops/accountsservice.nix @@ -36,11 +36,11 @@ with lib; systemd.packages = [ pkgs.accountsservice ]; - systemd.services.accounts-daemon= { + systemd.services.accounts-daemon = { wantedBy = [ "graphical.target" ]; - } // (mkIf (!config.users.mutableUsers) { + } // (optionalAttrs (!config.users.mutableUsers) { environment.NIXOS_USERS_PURE = "true"; }); }; From 6c84945099a9dd82d252e7b57f3fc3a8fbffd11e Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 16 Aug 2018 21:50:41 +0900 Subject: [PATCH 2/3] lightdm: fix typos --- nixos/modules/services/x11/display-managers/lightdm.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix index 6be15d8cdf4..06f017e9bf4 100644 --- a/nixos/modules/services/x11/display-managers/lightdm.nix +++ b/nixos/modules/services/x11/display-managers/lightdm.nix @@ -15,7 +15,7 @@ let inherit (pkgs) lightdm writeScript writeText; - # lightdm runs with clearenv(), but we need a few things in the enviornment for X to startup + # lightdm runs with clearenv(), but we need a few things in the environment for X to startup xserverWrapper = writeScript "xserver-wrapper" '' #! ${pkgs.bash}/bin/bash @@ -209,7 +209,7 @@ in services.dbus.enable = true; services.dbus.packages = [ lightdm ]; - # lightdm uses the accounts daemon to rember language/window-manager per user + # lightdm uses the accounts daemon to remember language/window-manager per user services.accounts-daemon.enable = true; security.pam.services.lightdm = { From 7fbdd7fcf4242f406182c4b2671f25e1d2c86397 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 16 Aug 2018 17:56:44 +0900 Subject: [PATCH 3/3] 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 a19ac2a50c2..933b9da2c83 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 06f017e9bf4..dc82f7086c8 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;