summary refs log tree commit diff
path: root/nixos/modules/services/x11/display-managers/default.nix
diff options
context:
space:
mode:
authorStefan Frijters <sfrijters@gmail.com>2020-08-09 23:16:37 +0200
committerStefan Frijters <sfrijters@gmail.com>2021-02-27 17:55:47 +0100
commit37460768e229cbaf388b1523b17379b7d397a2f8 (patch)
treee551250ccdca3e15c080fea6e8101a375ab00ff8 /nixos/modules/services/x11/display-managers/default.nix
parent17f2d43f42063475ea5b6c0ac87f6422e8e0a4e8 (diff)
downloadnixpkgs-37460768e229cbaf388b1523b17379b7d397a2f8.tar
nixpkgs-37460768e229cbaf388b1523b17379b7d397a2f8.tar.gz
nixpkgs-37460768e229cbaf388b1523b17379b7d397a2f8.tar.bz2
nixpkgs-37460768e229cbaf388b1523b17379b7d397a2f8.tar.lz
nixpkgs-37460768e229cbaf388b1523b17379b7d397a2f8.tar.xz
nixpkgs-37460768e229cbaf388b1523b17379b7d397a2f8.tar.zst
nixpkgs-37460768e229cbaf388b1523b17379b7d397a2f8.zip
nixos/x11: Source .xprofile earlier in xsession-wrapper
This allows users to set e.g. XCOMPOSECACHE before it's used.
Diffstat (limited to 'nixos/modules/services/x11/display-managers/default.nix')
-rw-r--r--nixos/modules/services/x11/display-managers/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix
index 9fdbe753dad..c75dc64d61c 100644
--- a/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -37,6 +37,11 @@ let
       . /etc/profile
       cd "$HOME"
 
+      # Allow the user to execute commands at the beginning of the X session.
+      if test -f ~/.xprofile; then
+          source ~/.xprofile
+      fi
+
       ${optionalString cfg.displayManager.job.logToJournal ''
         if [ -z "$_DID_SYSTEMD_CAT" ]; then
           export _DID_SYSTEMD_CAT=1
@@ -75,11 +80,6 @@ let
 
       ${cfg.displayManager.sessionCommands}
 
-      # Allow the user to execute commands at the beginning of the X session.
-      if test -f ~/.xprofile; then
-          source ~/.xprofile
-      fi
-
       # Start systemd user services for graphical sessions
       /run/current-system/systemd/bin/systemctl --user start graphical-session.target