!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

338 Members
https://github.com/nix-community/NixOS-WSL57 Servers

Load older messages


SenderMessageTime
2 Dec 2022
@sandro:supersandro.deSandro 🐧 wsl.exe --shutdown hangs forever as well 00:52:33
@sandro:supersandro.deSandro 🐧or long enough that I restarted. Usually it is done within a minute.00:52:50
@k900:0upti.meK900https://github.com/microsoft/WSL/releases07:28:05
@k900:0upti.meK900They have a second person doing WSL releases!07:28:11
@k900:0upti.meK900(and also yet another attempt at not clobbering the X socket)07:28:18
6 Dec 2022
@hdhog:matrix.hdhog.ruhdhog 18:43:50
7 Dec 2022
@sandro:supersandro.deSandro 🐧Anyone has any advice for https://github.com/microsoft/WSL/issues/5806 ?16:08:16
@sandro:supersandro.deSandro 🐧 nzbr (they/it): what do you think about deleting the tmpfiles rule altogether in https://github.com/nix-community/NixOS-WSL/pull/172 ? 16:18:56
@nzbr:nzbr.deArson CopperflameIf it's an upstream issue that we're fixing, I'd say yes. Do other distros have the same issue?18:11:59
@sandro:supersandro.deSandro 🐧They probably didn't have the tmpfiles rule in the first place19:15:42
8 Dec 2022
@daniel573:matrix.orgDaniel Kahlenberg joined the room.08:37:49
@daniel573:matrix.orgDaniel KahlenbergI am experiencing a weird behaviour since I enabled native-systemd or native-docker or both at the same time - trying to figure out which combo it is: After a restart of the physical machine and trying to run wsl -d NixOS --user myuser again, the NixOS instance entirely refuses to start or even give me some output at all, only (useless workaround was the -e sh switch that basically gave me nothing to work with either.08:42:08
@daniel573:matrix.orgDaniel KahlenbergRight now I imported the nixos-wsl tgz afresh and set up everything again this time without native-systemd first to see if the issue will reproduce later maybe without docker-native as well.08:44:08
@daniel573:matrix.orgDaniel Kahlenberg(https://github.com/573/nix-config-1/blob/54e247d/nixos/base/nixoswsl.nix)08:45:18
@imnotdwight:matrix.orgimnotdwight joined the room.14:34:46
@sandro:supersandro.deSandro 🐧did you change the nixos-wsl module option for native-systemd?14:37:35
@daniel573:matrix.orgDaniel Kahlenberg

Sandro 🐧: I had basically

    wsl = {
      enable = true;
      defaultUser = "dkahlenberg";
      #interop = {
      #  register = true;
      #  preserveArgvZero = true;
      #};
      #nativeSystemd = true;
      docker-native = {
        enable = true;
      };
    };
    # https://github.com/nix-community/NixOS-WSL/discussions/71
    security.sudo.wheelNeedsPassword = true;
14:41:21
@daniel573:matrix.orgDaniel KahlenbergAlso I just see that I already deactivated nativeSystemd again, I remember having all commented options seen above on meaning active when it happened.14:44:26
@daniel573:matrix.orgDaniel KahlenbergMaybe it contributed that I had added the new defaultUser with a uid of 1000, which is also the default for the nixos user ?14:45:39
@daniel573:matrix.orgDaniel KahlenbergAs in https://github.com/NixOS/nixpkgs/issues/1217014:46:29
@sandro:supersandro.deSandro 🐧
In reply to @daniel573:matrix.org
Maybe it contributed that I had added the new defaultUser with a uid of 1000, which is also the default for the nixos user ?
I have changed that, too
14:51:16
@nzbr:nzbr.deArson CopperflameEnabling the docker-native module might not be even necessary with native systemd anymore - it was mainly just a workaround for docker desktop being unable to start the proxy binary inside NixOS itself, so it might work now without the syschdemd container in the way14:53:40
9 Dec 2022
@k900:0upti.meK900Anyone else getting Dec 09 09:51:23 akane-wsl systemd[13274]: systemd-tmpfiles-setup.service: Failed to set up credentials: Protocol error after the systemd 252 upgrade?06:53:21
@sandro:supersandro.deSandro 🐧I am still pinning to systemd-249 IIRC because systemctl status was not logging errors/warnings on that09:56:15
@daniel573:matrix.orgDaniel Kahlenberg
In reply to @nzbr:nzbr.de
Enabling the docker-native module might not be even necessary with native systemd anymore - it was mainly just a workaround for docker desktop being unable to start the proxy binary inside NixOS itself, so it might work now without the syschdemd container in the way

docker-native does not seem to be the problem in my case, as soon as I reenabled the nativeSystemd setting (see https://github.com/573/nix-config-1/blob/dcc37f6/nixos/base/nixoswsl.nix#L24) the problem returned: wsl --shutdown then wsl.exe -d NixOS no interactive shell opened anymore.

nzbr (they/it) For what you wrote about docker-native, does that mean I will have the native docker automatically then (don't want to depend on docker desktop) ?

10:48:05
@nzbr:nzbr.deArson CopperflameYou can use either native docker (the daemon runs as a systemd service in NixOS) or Docker Desktop). Docker desktop might work without enabling it, but you'll still need to enable docker-native if you want to use that. (I mixed up docker-native and docker-desktop in my answer, sorry 😅)10:52:30
@nzbr:nzbr.deArson CopperflameDoes native systemd work without docker enabled?10:52:51
@daniel573:matrix.orgDaniel Kahlenberg

nzbr (they/it): I have to try, right now (https://github.com/573/nix-config-1/blob/04a3c80/nixos/base/nixoswsl.nix#L25) I have nativeSystemd explicitly set on false.

For docker (enabled) I have the native (non-desktop) version and even the binfmt-setting enabled.

With this I could successfully wsl --shutdown and wsl -d NixOS again. Only thing I did differently was chowning all /home/nixos to nixos user and my home dir to my user as well as deletig /etc/passwd and /etc/group entries concerning these prior nixos-rebuild.

13:16:48
@daniel573:matrix.orgDaniel KahlenbergLet's see if I find the strength to set it up once more with native-systemd now.13:17:28
@daniel573:matrix.orgDaniel Kahlenberg *

nzbr (they/it): I have to try, right now (https://github.com/573/nix-config-1/blob/04a3c80/nixos/base/nixoswsl.nix#L25) I have nativeSystemd explicitly set on false.

For docker (enabled) I have the native (non-desktop) version and even the binfmt-setting enabled.

With this I could successfully wsl --shutdown and wsl -d NixOS again. EDIT: Using shopt -s dotglob; chown -R nixos:users /home/nixos; shopt -u dotglob to be entirely correct: Only thing I did differently was chowning all /home/nixos to nixos user and my home dir to my user as well as deletig /etc/passwd and /etc/group entries concerning these prior nixos-rebuild.

13:24:57

Show newer messages


Back to Room ListRoom Version: 9