aboutsummaryrefslogtreecommitdiff
path: root/modules/xsession.nix
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2017-01-16 23:54:45 +0100
committerRobert Helgesson <robert@rycee.net>2017-01-16 23:54:45 +0100
commit5fbbbd1ea4978c22d527af00c9b8af66b0bfcba8 (patch)
tree36b8dc888e2138bfb21ec1a5d09e14dc49915fa5 /modules/xsession.nix
parentf35b9a9970ef66eb8ede5a5595b01777e55fde4a (diff)
pam: add module
Also make it possible to set session variables using PAM rather than Bash.
Diffstat (limited to 'modules/xsession.nix')
-rw-r--r--modules/xsession.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/xsession.nix b/modules/xsession.nix
index 3b36a5b537f..f498d51786a 100644
--- a/modules/xsession.nix
+++ b/modules/xsession.nix
@@ -72,8 +72,12 @@ in
home.file.".xsession" = {
mode = "555";
text = ''
- # Rely on Bash to set session variables.
- . "$HOME/.profile"
+ ${
+ # If we want bash to set the session variables then we need
+ # to pull in .profile since that's where they are.
+ optionalString (config.home.sessionVariableSetter == "bash")
+ ". \"$HOME/.profile\""
+ }
systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS
systemctl --user import-environment DISPLAY