From 881512e23f51f0c00f5adb58788998aca65ebea3 Mon Sep 17 00:00:00 2001 From: LoveIsGrief Date: Wed, 10 Aug 2022 22:46:00 +0200 Subject: [PATCH] x11: Source .profile and .xprofile Other popular distros (OpenSuse, Ubuntu, Gentoo, Arch) read $HOME/.profile when starting X11 display managers. When moving to nixOS, that is then broken leading to unpredictable behavior (probably programs not working). This adds similar behavior to https://github.com/sddm/sddm/blob/develop/data/scripts/Xsession Related to #185979 --- nixos/modules/services/x11/display-managers/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index cc94fe7c0be..03bf5d1cd2d 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -35,6 +35,10 @@ let # Shared environment setup for graphical sessions. . /etc/profile + if test -f ~/.profile; then + source ~/.profile + fi + cd "$HOME" # Allow the user to execute commands at the beginning of the X session.