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

Update remaining references to wsl.automountPath #158

Merged
merged 1 commit into from
Nov 9, 2022
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
2 changes: 1 addition & 1 deletion configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ in

wsl = {
enable = true;
automountPath = "/mnt";
wslConf.automount.root = "/mnt";
defaultUser = "nixos";
startMenuLaunchers = true;

Expand Down
2 changes: 1 addition & 1 deletion modules/docker-desktop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ with builtins; with lib; {
systemd.services.docker-desktop-proxy = {
description = "Docker Desktop proxy";
script = ''
${config.wsl.automountPath}/wsl/docker-desktop/docker-desktop-user-distro proxy --docker-desktop-root ${config.wsl.automountPath}/wsl/docker-desktop
${config.wsl.wslConf.automount.root}/wsl/docker-desktop/docker-desktop-user-distro proxy --docker-desktop-root ${config.wsl.wslConf.automount.root}/wsl/docker-desktop
'';
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Expand Down
6 changes: 3 additions & 3 deletions modules/wsl-distro.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ with lib; {
cfg = config.wsl;

syschdemd = pkgs.callPackage ../scripts/syschdemd.nix {
inherit (cfg) automountPath;
automountPath = cfg.wslConf.automount.root;
defaultUser = config.users.users.${cfg.defaultUser};
};

Expand Down Expand Up @@ -149,9 +149,9 @@ with lib; {
# preserve $PATH from parent
variables.PATH = [ "$PATH" ];
extraInit = ''
export WSLPATH=$(echo "$PATH" | tr ':' '\n' | grep -E "^${cfg.automountPath}" | tr '\n' ':')
export WSLPATH=$(echo "$PATH" | tr ':' '\n' | grep -E "^${cfg.wslConf.automount.root}" | tr '\n' ':')
${if cfg.interop.includePath then "" else ''
export PATH=$(echo "$PATH" | tr ':' '\n' | grep -vE "^${cfg.automountPath}" | tr '\n' ':')
export PATH=$(echo "$PATH" | tr ':' '\n' | grep -vE "^${cfg.wslConf.automount.root}" | tr '\n' ':')
nzbr marked this conversation as resolved.
Show resolved Hide resolved
''}
'';
};
Expand Down