Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bind mount X11 socket instead of symlinking #420

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions modules/systemd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,7 @@ 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.settings = {
"10-wslg-x11" = {
"/tmp/.X11-unix" = {
L = {
argument = "${cfg.wslConf.automount.root}/wslg/.X11-unix";
};
};
};
};
};

};
}
6 changes: 6 additions & 0 deletions modules/wsl-distro.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ in
];
};

# Make sure the WSLg X11 socket is available if /tmp is mounted to something else
fileSystems."/tmp/.X11-unix/X0" = {
device = "${cfg.wslConf.automount.root}/wslg/.X11-unix/X0";
options = [ "bind" ];
};

# dhcp is handled by windows
networking.dhcpcd.enable = false;

Expand Down
Loading