diff --git a/modules/greetd.nix b/modules/greetd.nix index 25ed598..56fff8b 100644 --- a/modules/greetd.nix +++ b/modules/greetd.nix @@ -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 ];