Skip to content

Commit

Permalink
Merge pull request #1 from nzbr/relink-x11-socket
Browse files Browse the repository at this point in the history
don't hardcode automount root
  • Loading branch information
K900 authored Jan 30, 2023
2 parents bc2ee24 + c590241 commit fe26628
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/wsl-conf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
};
Expand Down
2 changes: 1 addition & 1 deletion modules/wsl-distro.nix
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ with lib; {

# 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 - - - - /mnt/wslg/.X11-unix" ];
tmpfiles.rules = [ "L /tmp/.X11-unix - - - - ${cfg.wslConf.automount.root}/wslg/.X11-unix" ];
};

# Start a systemd user session when starting a command through runuser
Expand Down

0 comments on commit fe26628

Please sign in to comment.