diff options
| author | psmf <33873980+psmf@users.noreply.github.com> | 2022-11-25 19:43:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-25 19:43:50 +0100 |
| commit | 08e2cf00c2940c995af40ec5b615059b3ad9d4f5 (patch) | |
| tree | e212cea7eb03804cd2855050134ce4e357edca04 /modules | |
| parent | bab9aa46a90a6be42fabdec8b22f3294c1ad4949 (diff) | |
Setup /bin/login for native systemd support (#169)
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).
Co-authored-by: Petr Svoboda <petr@jatys.cz>
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/wsl-distro.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/wsl-distro.nix b/modules/wsl-distro.nix index 6fb4201..a5b3181 100644 --- a/modules/wsl-distro.nix +++ b/modules/wsl-distro.nix @@ -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 = { |
