NixOS on WSL | 338 Members | |
| https://github.com/nix-community/NixOS-WSL | 57 Servers |
| Sender | Message | Time |
|---|---|---|
| 8 Dec 2022 | ||
| 14:34:46 | ||
| did you change the nixos-wsl module option for native-systemd? | 14:37:35 | |
| Sandro 🐧: I had basically
| 14:41:21 | |
| Also 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 | |
| Maybe 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 | |
| As in https://github.com/NixOS/nixpkgs/issues/12170 | 14:46:29 | |
In reply to @daniel573:matrix.orgI have changed that, too | 14:51:16 | |
| 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 | 14:53:40 | |
| 9 Dec 2022 | ||
| Anyone 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 | |
| I am still pinning to systemd-249 IIRC because systemctl status was not logging errors/warnings on that | 09:56:15 | |
In reply to @nzbr:nzbr.de 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: 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 | |
| You 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 | |
| Does native systemd work without docker enabled? | 10:52:51 | |
| 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 | |
| Let's see if I find the strength to set it up once more with native-systemd now. | 13:17:28 | |
| * 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 | 13:24:57 | |
Having both docker-native.enabled = true and nativeSystemd = true also renders my system broken (interop.* attributes true both). Trying nativeSystemd without docker-native now. | 15:23:17 | |
Same problem with nativeSystemd = true and docker-native not enabled (interop.* attributes all true). | 16:19:06 | |
| What exactly is the problem? | 16:20:27 | |
| 16:20:29 | |
| Like, what are you doing and what is happening? | 16:20:42 | |
K900: After the installation of NixOS-WSL and "deploying" my above described config I run wsl --shutdown. Then when running wsl -d NixOS again, nothing happens, no prompt appears, the instance is in stopped state. Only thing available is wsl -d NixOS -e sh but that leaves me with no possibility to debug further so I have to reinstall with the problematic config changes rolled back. | 16:24:29 | |
| What do you mean by "is in stopped state"? | 16:24:50 | |
| Is the VM actually dead, or are you just not getting any output? | 16:24:57 | |
Do you get anything if you run wsl --system -d NixOS and then dmesg? | 16:25:15 | |
| 16:25:25 | |
Directly after wsl -d NixOS | 16:25:37 | |
| OK, that's whatever, that CLI is very confused | 16:26:08 | |
Try wsl --system -d NixOS and then dmesg and look for errors | 16:26:20 | |
| On my system this just prints the wsl help page, guess my version is too old then (Win10) | 16:27:04 | |