!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

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

Load older messages


SenderMessageTime
25 Nov 2022
@k900:0upti.meK900EXACTLY17:34:38
@psvo:matrix.orgpsvohm, for consideration: I've just switched my default locale cs_CZ.UTF8, but the shell spawned by WSL /init is still having LANG=en_US.UTF-817:38:08
@k900:0upti.meK900Oh no17:38:19
@k900:0upti.meK900I think it's worse actually17:38:22
@k900:0upti.meK900LOCALE_ARCHIVE is normally set by PAM17:38:27
@k900:0upti.meK900But we don't have a PAM17:38:29
@psvo:matrix.orgpsvohm, seems the env is correct only for the bash spawn by the /bin/login, so I believe you are right17:40:43
@k900:0upti.meK900I wonder if it'll work if i set the environment on the systemd itself17:42:14
@k900:0upti.meK900Since technically the /init process is its child17:43:16
@psvo:matrix.orgpsvoit seem the locale is by /init17:44:05
@k900:0upti.meK900 Worst case, we can generate a horrible wrapper script to export environment.sessionVariables and then exec into the normal shell 17:44:11
@psvo:matrix.orgpsvo * it seem the locale is set by /init17:44:13
@k900:0upti.meK900Oh actually I don't think we can17:48:34
@k900:0upti.meK900That's fun17:48:35
@k900:0upti.meK900Because we have to do it for every user and NixOS modules don't like this kind of recursion17:48:48
@psvo:matrix.orgpsvobtw: https://learn.microsoft.com/en-us/windows/wsl/faq#how-do-i-change-the-display-language-of-wsl-17:51:14
@psvo:matrix.orgpsvoplease disregard, I've misunderstood it, it should not affect nixos probably17:52:26
@k900:0upti.meK900OK I am very confused now17:53:18
@k900:0upti.meK900 login -f does invoke PAM 17:53:31
@k900:0upti.meK900 But WSL doesn't invoke login -f 17:53:51
@k900:0upti.meK900Or rather, it invokes it ONCE17:53:55
@k900:0upti.meK900Oh god I have a SUSPICION17:55:01
@k900:0upti.meK900If this turns out to be it17:55:19
@k900:0upti.meK900I will slap someone17:55:24
@nzbr:nzbr.deArson Copperflame From what I learned when I made the horrible runuser hack, systemd --user only works, when the shell is inside a PAM session and the PAM config that is used includes pam_systemd.so 17:55:39
@k900:0upti.meK900OK it's not it17:55:53
@k900:0upti.meK900Thank god17:55:55
@nzbr:nzbr.deArson Copperflame So MS did the exact same thing that I did, but they used login instead of runuser 17:55:56
@k900:0upti.meK900I think what they're doing is worse actually17:56:09
@k900:0upti.meK900 They're spawning exactly one PAM session with login 17:56:18

Show newer messages


Back to Room ListRoom Version: 9