!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

347 Members
https://github.com/nix-community/NixOS-WSL61 Servers

Load older messages


SenderMessageTime
25 Nov 2022
@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
@k900:0upti.meK900
  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:0upti.meK900This works.18:08:49
@k900:0upti.meK900I hate it.18:08:51
@k900:0upti.meK900https://github.com/nix-community/NixOS-WSL/pull/17018:10:26
@k900:0upti.meK900This turned out to be unrelated but still is more correct18:10:34
@k900:0upti.meK900 Also nzbr (they/it) while you're here pls merge https://github.com/nix-community/NixOS-WSL/pull/169 18:10:53
@nzbr:nzbr.deArson 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:0upti.meK900https://github.com/microsoft/WSL/issues/9213 18:14:57
@k900:0upti.meK900Opened18:14:58
@k900:0upti.meK900
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
@nzbr:nzbr.deArson Copperflame I mean, the tests work xD 18:16:48
@k900:0upti.meK900Then just merge them?18:18:05
@k900:0upti.meK900If it breaks, we can always fix it18:18:15
@nzbr:nzbr.deArson Copperflame Merged! Please rebase/merge main into your PRs K900 Sandro 🐧 psvo 18:22:06
@k900:0upti.meK900Done18:22:35
@k900:0upti.meK900Also filed an issue on our side: https://github.com/nix-community/NixOS-WSL/issues/17118:22:41

Show newer messages


Back to Room ListRoom Version: 9