Skip to content

Commit

Permalink
Merge pull request #420 from nix-community/x11-socket
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Feb 24, 2024
2 parents d6c09b7 + 2ec81eb commit 7e3fc6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
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

0 comments on commit 7e3fc6a

Please sign in to comment.