summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authornzbr <mail@nzbr.de>2022-11-14 00:47:49 +0100
committerGitHub <noreply@github.com>2022-11-14 00:47:49 +0100
commite9e8d01c5a2f57d330d42c9a772cf67d89b43650 (patch)
tree9e61d75f44211ddfd6df9cde5ad4d1e8f99edcd2 /modules
parenta4bbcf329a98a7faf79d10370278f87e836e1d7c (diff)
Fix syschdemd exit code (#140)
* use systemd-run instead of machinectl * fix systemd user sessions by launching through runuser * fix: add which to path
Diffstat (limited to 'modules')
-rw-r--r--modules/wsl-distro.nix3
1 files changed, 3 insertions, 0 deletions
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"
);