nullpo-head / wsl-distrod

Distrod is a meta-distro for WSL 2 which installs Ubuntu, Arch, Debian, Gentoo, etc. with systemd in a minute for you. Distrod also has built-in auto-start feature on Windows startup and port forwarding ability.
MIT License
1.92k stars 92 forks source link

[Bug]: Failed to disable systemd-resolved.service. on Nixos #84

Open GENDRAUD opened 1 year ago

GENDRAUD commented 1 year ago

Describe the bug

I try to make my Nixos Distro Run Systemd with the second method.

Steps to reproduce

It'run on my Nixos on wsl.

I do what is written on the paragraph "Option 2: Make your Current Distro Run Systemd"

curl -L -O "https://raw.githubusercontent.com/nullpo-head/wsl-distrod/main/install.sh"
chmod +x install.sh

I've change install.sh mkdir become mkdir -p in order to fix the following problem: can't create the file sudo ./install.sh install It works

/opt/distrod/bin/distrod enable --start-on-windows-boot doesn't work. I need root permission.

sudo /opt/distrod/bin/distrod enable --start-on-windows-boot

[Distrod][WARN] Faled to disable systemd-resolved.service. Error: Failed to parse unit file '"/etc/systemd/system/systemd-resolved.service"'.

Caused by: description() is deprecated; use Display: No directives in the file [Distrod][ERROR] Failed to initialize the rootfs.

Caused by: 0: Failed to create per-user WSL envs load script. 1: Failed to create HostPath("/etc/profile.d/distrod-user-wsl-envs.sh") 2: No such file or directory (os error 2)

It doesn't work. I've already done that with Debian on WSL and it has worked fine. That is a problem specific to Nixos

Expected behavior

No response

Windows version

windows 11

Linux kernel version

Linux nixos 5.15.79.1-microsoft-standard-WSL2 #1 SMP Wed Nov 23 01:01:46 UTC 2022 x86_64 GNU/Linux

Distro

Nixos

How did you install that distro?

Installed by Distrod wizard

Logs

I've used the second option I haven't launch Distrod. I've tried the first option, but it has worked as I gived the tar.something file but that is another problem.

additional comment

No response