From e9e8d01c5a2f57d330d42c9a772cf67d89b43650 Mon Sep 17 00:00:00 2001 From: nzbr Date: Mon, 14 Nov 2022 00:47:49 +0100 Subject: Fix syschdemd exit code (#140) * use systemd-run instead of machinectl * fix systemd user sessions by launching through runuser * fix: add which to path --- modules/wsl-distro.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules') diff --git a/modules/wsl-distro.nix b/modules/wsl-distro.nix index cbbf1e8..6fb4201 100644 --- a/modules/wsl-distro.nix +++ b/modules/wsl-distro.nix @@ -117,6 +117,9 @@ with lib; { enableEmergencyMode = false; }; + # Start a systemd user session when starting a command through runuser + security.pam.services.runuser.startSession = true; + warnings = (optional (config.systemd.services.systemd-resolved.enable && config.wsl.wslConf.network.generateResolvConf) "systemd-resolved is enabled, but resolv.conf is managed by WSL" ); -- cgit v1.2.3