| 25 Nov 2022 |
K900 | We now need to shim every user's shell | 17:58:59 |
psvo | yes, but maybe the systemd shim could mount-move is and provide another shim | 17:59:02 |
K900 | And ideally we'd do that automatically | 17:59:06 |
psvo | * yes, but maybe the systemd shim could mount-move it and provide another shim | 17:59:21 |
K900 | I'm not even sure how they invoke that /init | 17:59:35 |
K900 | It is probably easier to shim the shell | 17:59:41 |
K900 | At least for the default user | 17:59:44 |
K900 | Like basically all we need is replace the default shell with
#!/bin/sh
. /etc/set-environment
exec ${realShell}
| 18:00:36 |
K900 | But we can't do that without infinite-recursing | 18:03:45 |
psvo | a workaround could to set WSLENV=LOCALE_ARCHIVE/u and LOCALE_ARCHIVE in windows environment | 18:04:29 |
psvo | * a workaround could be to set WSLENV=LOCALE_ARCHIVE/u and LOCALE_ARCHIVE in windows environment | 18:04:34 |
Arson Copperflame | We need to make a new option for setting the shell then. I absolutely hate it, but I don't see a way around that | 18:04:42 |
K900 | We could upstream something very stupid into nixpkgs | 18:07:24 |
Arson 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 |
K900 | users.users.k900.shell = let
wrapper = pkgs.writeShellScriptBin "shell-wrapper" ''
. /etc/set-environment
exec ${pkgs.zsh}/bin/zsh "$@"
'';
in lib.mkForce "${wrapper}/bin/shell-wrapper";
| 18:08:47 |
K900 | This works. | 18:08:49 |
K900 | I hate it. | 18:08:51 |
K900 | https://github.com/nix-community/NixOS-WSL/pull/170 | 18:10:26 |
K900 | This turned out to be unrelated but still is more correct | 18:10:34 |
K900 | Also nzbr (they/it) while you're here pls merge https://github.com/nix-community/NixOS-WSL/pull/169 | 18:10:53 |
Arson Copperflame | Can you have a look at #161? I want to have the tests merged before the other PRs - they can't do native systemd yet, but we can at least prevent breaking things that already work | 18:13:14 |
K900 | https://github.com/microsoft/WSL/issues/9213 | 18:14:57 |
K900 | Opened | 18:14:58 |
K900 | In reply to @nzbr:nzbr.de Can you have a look at #161? I want to have the tests merged before the other PRs - they can't do native systemd yet, but we can at least prevent breaking things that already work My PowerShell is terrible but seems OK to me | 18:15:19 |
Arson Copperflame | I mean, the tests work xD | 18:16:48 |
K900 | Then just merge them? | 18:18:05 |
K900 | If it breaks, we can always fix it | 18:18:15 |
Arson Copperflame | Merged! Please rebase/merge main into your PRs K900 Sandro 🐧 psvo | 18:22:06 |
K900 | Done | 18:22:35 |
K900 | Also filed an issue on our side: https://github.com/nix-community/NixOS-WSL/issues/171 | 18:22:41 |