Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightdm: enable the accounts daemon to find dbus interface #45107

Merged
merged 3 commits into from Aug 16, 2018

Conversation

mnacamura
Copy link
Contributor

Motivation for this change

Fix #45059

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@mnacamura mnacamura changed the title Lightdm accountsservice lightdm: enable the accounts daemon to find dbus interface Aug 16, 2018
@Mic92 Mic92 requested a review from jtojnar August 16, 2018 11:27
@@ -212,6 +212,10 @@ in
# lightdm uses the accounts daemon to rember language/window-manager per user
services.accounts-daemon.enable = true;

# Enable the accounts daemon to find lightdm's dbus interface
environment.pathsToLink = [ "/share/accountsservice" ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should go to accountsservice.nix. There might be other extensions than lightdm.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Done.


wantedBy = [ "graphical.target" ];

} // (mkIf (!config.users.mutableUsers) {
# Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice
environment.XDG_DATA_DIRS = "/run/current-system/sw/share";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something like ${config.system.path}/share should be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thank you for your review!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, shouldn't systemd system services run in an environment that has XDG_DATA_DIRS set appropriately for the current system? I'm surprised more things don't break if that not true.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variables are often set by login shell, so the services cannot see them. It is probably good thing, as the unclean environment could produce unpredictable behaviour.

@jtojnar
Copy link
Contributor

jtojnar commented Aug 16, 2018

Looks great, thanks.

@jtojnar jtojnar merged commit 6f8fe25 into NixOS:master Aug 16, 2018
@mnacamura mnacamura deleted the lightdm-accountsservice branch August 17, 2018 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants