diff options
| author | K900 <me@0upti.me> | 2023-01-30 08:52:40 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-30 08:52:40 +0300 |
| commit | 45194dd0a7b0f27fd65f234e5302e746126ee1b6 (patch) | |
| tree | be8c5ada707e036d5a8e7ad71dd5c98166f23327 /modules | |
| parent | 0467c67f52f965c86f0e64d467a80827833c196d (diff) | |
| parent | fe2662870a36bff0b141d28ce1c72795912884ce (diff) | |
Merge pull request #207 from K900/relink-x11-socket
fix: relink the X11 socket into place if needed
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/wsl-conf.nix | 2 | ||||
| -rw-r--r-- | modules/wsl-distro.nix | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/modules/wsl-conf.nix b/modules/wsl-conf.nix index cb870c7..1c9ae2a 100644 --- a/modules/wsl-conf.nix +++ b/modules/wsl-conf.nix @@ -20,7 +20,7 @@ with lib; { description = "Mount entries from /etc/fstab through WSL. You should probably leave this on false, because systemd will mount those for you."; }; root = mkOption { - type = str; + type = strMatching "^/.*[^/]$"; default = "/mnt/"; description = "The directory under which to mount windows drives."; }; diff --git a/modules/wsl-distro.nix b/modules/wsl-distro.nix index 43d2bc6..e88684c 100644 --- a/modules/wsl-distro.nix +++ b/modules/wsl-distro.nix @@ -127,6 +127,10 @@ with lib; { # Don't allow emergency mode, because we don't have a console. enableEmergencyMode = false; + + # Link the X11 socket into place. This is a no-op on a normal setup, + # but helps if /tmp is a tmpfs or mounted from some other location. + tmpfiles.rules = [ "L /tmp/.X11-unix - - - - ${cfg.wslConf.automount.root}/wslg/.X11-unix" ]; }; # Start a systemd user session when starting a command through runuser |
