!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

333 Members
https://github.com/nix-community/NixOS-WSL56 Servers

Load older messages


SenderMessageTime
25 Nov 2022
@k900:0upti.meK900That just hangs around in the background17:56:24
@psvo:matrix.orgpsvojust checked: when you put your locale to /etc/default/locale, the shell spawn by /init will have, not that solves anything, but obviously there's a huge amount of hardcoded paths17:56:35
@psvo:matrix.orgpsvoyes, I believe they do17:56:50
@k900:0upti.meK900 But that does not help us here because we need PAM on every process 17:56:52
@k900:0upti.meK900Because that's how we get LOCALE_ARCHIVE17:57:00
@psvo:matrix.orgpsvocould we shim /init? :)17:57:28
@k900:0upti.meK900We already are17:57:38
@k900:0upti.meK900And it's not going to help17:57:41
@k900:0upti.meK900Because they're spawning the shell processes completely outside /init17:57:49
@psvo:matrix.orgpsvowe shim /sbin/init, right?17:57:53
@k900:0upti.meK900What we need to do is shim the SHELL17:57:55
@k900:0upti.meK900Oh no we can't shim the WSL /init17:58:05
@k900:0upti.meK900It's bind-mounted from inside the utility distro17:58:16
@nzbr:nzbr.deArson CopperflameHey, at least we have experience shimming the shell /s17:58:46
@k900:0upti.meK900WE DON'T17:58:51
@k900:0upti.meK900That's the problem17:58:54
@k900:0upti.meK900We now need to shim every user's shell17:58:59
@psvo:matrix.orgpsvoyes, but maybe the systemd shim could mount-move is and provide another shim17:59:02
@k900:0upti.meK900And ideally we'd do that automatically17:59:06
@psvo:matrix.orgpsvo * yes, but maybe the systemd shim could mount-move it and provide another shim17:59:21
@k900:0upti.meK900I'm not even sure how they invoke that /init17:59:35
@k900:0upti.meK900It is probably easier to shim the shell17:59:41
@k900:0upti.meK900At least for the default user17:59:44
@k900:0upti.meK900

Like basically all we need is replace the default shell with

#!/bin/sh
. /etc/set-environment
exec ${realShell}
18:00:36
@k900:0upti.meK900But we can't do that without infinite-recursing18:03:45
@psvo:matrix.orgpsvoa workaround could to set WSLENV=LOCALE_ARCHIVE/u and LOCALE_ARCHIVE in windows environment18:04:29
@psvo:matrix.orgpsvo * a workaround could be to set WSLENV=LOCALE_ARCHIVE/u and LOCALE_ARCHIVE in windows environment 18:04:34
@nzbr:nzbr.deArson CopperflameWe need to make a new option for setting the shell then. I absolutely hate it, but I don't see a way around that18:04:42
@k900:0upti.meK900We could upstream something very stupid into nixpkgs18:07:24
@nzbr:nzbr.deArson Copperflame Somtimes I wish I could have a super in nixos modules so that I can transform an option value in place - like with nixpkgs overlays 18:08:39

Show newer messages


Back to Room ListRoom Version: 9