Expose wayland-sessions at the FHS path moongreet expects
moongreet hardcodes /usr/share/wayland-sessions in src/sessions.rs and greeter.rs calls get_sessions(None, None), so the default cannot be overridden from config.
This commit is contained in:
@@ -39,6 +39,17 @@ in
|
||||
# boots into multi-user.target, where the unit never starts.
|
||||
systemd.defaultUnit = "graphical.target";
|
||||
|
||||
# moongreet scans /usr/share/wayland-sessions and /usr/share/xsessions;
|
||||
# both paths are hardcoded in src/sessions.rs and are not overridden by
|
||||
# the caller in greeter.rs. NixOS collects session files under
|
||||
# /run/current-system/sw/share instead, so the FHS paths are linked there.
|
||||
environment.pathsToLink = [ "/share/wayland-sessions" "/share/xsessions" ];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /usr/share 0755 root root -"
|
||||
"L+ /usr/share/wayland-sessions - - - - /run/current-system/sw/share/wayland-sessions"
|
||||
];
|
||||
|
||||
# The greeter session spawns `moongreet` by name from niri-greeter.kdl,
|
||||
# so it has to resolve in PATH.
|
||||
environment.systemPackages = [ moonarchPkgs.moongreet ];
|
||||
|
||||
Reference in New Issue
Block a user