Skip to content

Commit 3b3a06c

Browse files
committed
nixos/pantheon: Replace sessionCommands with extraInit
I think the issue here will be similar to issue 276028.
1 parent b1ebe0a commit 3b3a06c

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

nixos/modules/services/x11/desktop-managers/pantheon.nix

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -112,20 +112,17 @@ in
112112
# https://github.com/elementary/greeter/issues/368
113113
services.displayManager.defaultSession = mkDefault "pantheon";
114114

115-
services.xserver.displayManager.sessionCommands = ''
116-
if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then
117-
true
118-
${concatMapStrings (p: ''
119-
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
120-
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
121-
fi
122-
123-
if [ -d "${p}/lib/girepository-1.0" ]; then
124-
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
125-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
126-
fi
127-
'') cfg.sessionPath}
128-
fi
115+
environment.extraInit = ''
116+
${concatMapStrings (p: ''
117+
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
118+
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
119+
fi
120+
121+
if [ -d "${p}/lib/girepository-1.0" ]; then
122+
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
123+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
124+
fi
125+
'') cfg.sessionPath}
129126
'';
130127

131128
# Default services

0 commit comments

Comments
 (0)