!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

342 Members
https://github.com/nix-community/NixOS-WSL59 Servers

Load older messages


SenderMessageTime
17 Feb 2023
@k900:0upti.meK900Because there's less racing09:24:09
@nzbr:nzbr.deArson CopperflameI just switched to nix-ld and so far that seems like the more stable approach to me10:06:18
@k900:0upti.meK900I should really set that up at some point10:25:19
@k900:0upti.meK900OK wow10:39:20
@k900:0upti.meK900 It's just programs.nix-ld.enable now huh 10:39:28
@k900:0upti.meK900Noice10:39:29
@sandro:supersandro.deSandro 🐧and a second option to add packages13:37:26
18 Feb 2023
@i97henka:matrix.orghenrik-ch

I am continuing my adventures in nixos wsl and discovered something that I want to get your advice on:

This command seems to always work in PowerShell: wsl -d nixos

On the other hand, when I try and run with a specified user, like wsl -d nixos -u i97henka, it only works if I have logged in with the nixos user first.

Is that expected behaviour, or does it point at something being wrong with my setup?
Here a small PS extract:

PS C:\Users\i97he> wsl -d nixos -u i97henka <3>WSL (10) ERROR: CreateProcessEntryCommon:570: execvpe /run/current-system/sw/bin/bash failed 2 <3>WSL (10) ERROR: CreateProcessEntryCommon:579: Create process not expected to return PS C:\Users\i97he> wsl -d nixos -u i97henka

[i97henka@nixos:/mnt/c/Users/i97he]$

16:35:44
@k900:0upti.meK900Use native systemd16:36:08
@k900:0upti.meK900Don't use not native systemd16:36:20
@i97henka:matrix.orghenrik-ch *

I am continuing my adventures in nixos wsl and discovered something that I want to get your advice on:

This command seems to always work in PowerShell: wsl -d nixos

On the other hand, when I try and run with a specified user, like wsl -d nixos -u i97henka, it only works if I have logged in with the nixos user first.

Is that expected behaviour, or does it point at something being wrong with my setup?
Here a small PS extract:

PS C:\Users\i97he> wsl -d nixos -u i97henka <3>WSL (10) ERROR: CreateProcessEntryCommon:570: execvpe /run/current-system/sw/bin/bash failed 2 <3>WSL (10) ERROR: CreateProcessEntryCommon:579: Create process not expected to return PS C:\Users\i97he> wsl -d nixos -u i97henka

[i97henka@nixos:/mnt/c/Users/i97he\]$

16:37:20
@i97henka:matrix.orghenrik-ch *

I am continuing my adventures in nixos wsl and discovered something that I want to get your advice on:

This command seems to always work in PowerShell: wsl -d nixos

On the other hand, when I try and run with a specified user, like wsl -d nixos -u i97henka, it only works if I have logged in with the nixos user first.

Is that expected behaviour, or does it point at something being wrong with my setup?
Here a small PS extract:

PS C:\Users\i97he> wsl -d nixos -u i97henka
<3>WSL (10) ERROR: CreateProcessEntryCommon:570: execvpe /run/current-system/sw/bin/bash failed 2
<3>WSL (10) ERROR: CreateProcessEntryCommon:579: Create process not expected to return
PS C:\Users\i97he> wsl -d nixos -u i97henka

[i97henka@nixos:/mnt/c/Users/i97he\]$

16:38:02
@k900:0upti.meK900Can we please just drop syschdemd already, I genuinely don't care about the three people stuck on <=20H216:38:39
@i97henka:matrix.orghenrik-chThanks for reply @K900 - am I on the right track here you think? - https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/ 16:40:37
@k900:0upti.meK900No 16:40:49
@k900:0upti.meK900 Just set wsl.nativeSystemd = true in your config, rebuild, then restart your WSL VM 16:41:33
@i97henka:matrix.orghenrik-chThat works - thanks a lot 👍️🙂👍️ 🙏16:45:05
@cycyone3:matrix.orgcycyone3 changed their profile picture.17:08:58
@biswa96:matrix.orgBiswa96 joined the room.19:25:40
19 Feb 2023
@biswa96:matrix.orgBiswa96 left the room.09:10:35
@this-is-me:matrix.orgAndreas Weinzierl joined the room.23:22:46
20 Feb 2023
@i97henka:matrix.orghenrik-chDownload configuration.nix20:45:12
@i97henka:matrix.orghenrik-chI am trying to change my nixos-wsl configuration.nix to add nixvim - as described here: https://github.com/pta2002/nixvim#without-flakes what confuses me is that in the nixvim example, lib is an input, whereas in my configuration.nix it is not. As a starting point, I just added lib as an input, and that worked, but when I tried the import it failed sayint there is no lib.fetchGit function. Attached my current non-working nixos-wsl configuration.nix 20:45:18
@i97henka:matrix.orghenrik-ch * I am trying to change my nixos-wsl configuration.nix to add nixvim - as described here: https://github.com/pta2002/nixvim#without-flakes what confuses me is that in the nixvim example, lib is an input, whereas in my configuration.nix it is not. As a starting point, I just added lib as an input, and that worked, but when I tried the import it failed saying there is no lib.fetchGit function. Attached my current non-working nixos-wsl configuration.nix 20:45:44
@k900:0upti.meK900 It should probably be builtins.fetchGit or pkgs.fetchGit 20:45:46
@k900:0upti.meK900 Not lib.fetchGit 20:45:49
@i97henka:matrix.orghenrik-ch Thank you K900 , builtins is better - however, I get this error message now instead:
error: executing 'git': No such file or directory
warning: could not read HEAD ref from repo at 'https://github.com/pta2002/nixvim', using 'master'
error: executing 'git': No such file or directory
error: program 'git' failed with exit code 1
20:48:52
@k900:0upti.meK900 Do you have git installed? 20:49:04
@i97henka:matrix.orghenrik-ch which: no git in ... 🤣 20:49:47
@i97henka:matrix.orghenrik-chlet me sort that out20:49:56

Show newer messages


Back to Room ListRoom Version: 9