!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

281 Members
https://github.com/nix-community/NixOS-WSL55 Servers

Load older messages


SenderMessageTime
9 May 2024
@crhamiltonj:matrix.orgCharles Hamilton joined the room.19:19:18
10 May 2024
@isabel:isabelroses.comisabel changed their profile picture.13:15:09
11 May 2024
@98765abc:mozilla.org98765abc joined the room.06:22:56
@98765abc:mozilla.org98765abc set a profile picture.07:09:55
13 May 2024
@pm5k:matrix.orgpm5k joined the room.10:08:04
@pm5k:matrix.orgpm5k

Hi, I am currently having trouble figuring out why my wsl install of nix isn't seeing windows binaries available to it (explorer.exe for instance) nor can I see the windows path prepended to my nixOS path.

My config for the system (wsl specifically) is:

wsl = {
  enable = true;
  defaultUser = "redacted";
  nativeSystemd = true;
  interop.register = true;
  wslConf.network.hostname = "nixwsl";
};

Based on the documentation provided here: https://nix-community.github.io/NixOS-WSL/options.html the following options default to true and as such I assume they are set whether or not I explicitly define them in the block above?

  • wsl.interop.includePath
  • wsl.wslConf.interop.enabled
  • wsl.wslConf.interop.appendWindowsPath

However upon trying to run "explorer.exe" - it simply does not work. Not so on my orther wsl VM running Arch where the path seems to be appended properly. Can anyone help?

10:16:31
@k900:0upti.meK900What shell are you using?10:28:04
@pm5k:matrix.orgpm5k
In reply to @k900:0upti.me
What shell are you using?
zsh
10:30:20
@k900:0upti.meK900 Make sure programs.zsh.enable is enabled in your config 10:30:35
@pm5k:matrix.orgpm5kimage.png
Download image.png
10:31:04
@pm5k:matrix.orgpm5kThis is in configuration.nix10:31:12
@pm5k:matrix.orgpm5kimage.png
Download image.png
10:31:42
@pm5k:matrix.orgpm5kI also use this:10:31:43
@k900:0upti.meK900That is probably what's breaking it then10:31:59
@pm5k:matrix.orgpm5kSince I want my zshrc transferrable I am sourcing it this way10:31:59
@pm5k:matrix.orgpm5kDoes not seem to be as if I comment that out, and not use that symlink letting zsh gen a base config it still does not work10:33:24
@pm5k:matrix.orgpm5kOh okay so you know what the issue was?10:36:38
@pm5k:matrix.orgpm5kSimply logging out from the profile does not reapply the path stuff10:36:53
@pm5k:matrix.orgpm5k you need to execute wsl --shutdown for this to be picked up 10:37:06
@pm5k:matrix.orgpm5kJust tried it as a last ditch effort and it worked10:37:17
@nzbr:nzbr.denzbr (they/it) Anything that changes wsl.conf requires a restart of the distro (wsl -t <name> should be sufficient). It'd be nice if we could add a warning for that, like I've seen on other distros when an update requires a reboot 17:02:54
@nzbr:nzbr.denzbr (they/it) We could touch a file in /run through an activation script and print the message there as well as in the shell wrapper when there's no arguments and it is started as a login shell 17:05:36
14 May 2024
@chrillefkrr:matrix.orgchrillefkrr joined the room.15:43:48
@balanced_design:matrix.orgbalanced_designANhjzWUkI9.jpg
Download ANhjzWUkI9.jpg
18:07:47
@balanced_design:matrix.orgbalanced_designIm back to trying to get this to work. I had a default configuration.nix and I tried to include this in many many ways, all of which failed. This is what my current attempt looks like:18:07:53
@k900:0upti.meK900 Just take lines 20-32 from that config 18:08:53
@k900:0upti.meK900And paste them into the normal place you set options in 18:09:04
@balanced_design:matrix.orgbalanced_designI tried again a few ways to do that, still getting errors on rebuild switch. This is what my config looks like:18:16:43
@balanced_design:matrix.orgbalanced_designDgBa5EArLU.jpg
Download DgBa5EArLU.jpg
18:16:44
@k900:0upti.meK900 It needs to be in the same {} as the rest of your confif 18:17:33

Show newer messages


Back to Room ListRoom Version: 9