Skip to content

Commit

Permalink
Setup /bin/login for native systemd support
Browse files Browse the repository at this point in the history
When native systemd integration is enabled in WSL, it looks for
/bin/login to login the user.

It enables proper support for user session (dbus and systemd).
  • Loading branch information
psvo committed Nov 25, 2022
1 parent e9e8d01 commit c30c2b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/wsl-distro.nix
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ with lib; {
mkdir -p /sbin
ln -sf ${shim}/bin/nixos-wsl-native-systemd-shim /sbin/init
'';
setupLogin = stringAfter [ ] ''
echo "setting up /bin/login..."
mkdir -p /bin
ln -sf ${pkgs.shadow}/bin/login /bin/login
'';
};

environment = {
Expand Down

0 comments on commit c30c2b7

Please sign in to comment.