This commit is contained in:
Sebastian Moser
2025-03-27 11:17:34 +01:00
parent ff78b4ecb3
commit dfaa2b6248
23 changed files with 380 additions and 85 deletions

41
common/wsl.nix Normal file
View File

@@ -0,0 +1,41 @@
{ pkgs, inputs, lib, ...}:
{
imports = [
inputs.nix-wsl.nixosModules.wsl
];
wsl.enable = true;
wsl.wslConf.user.default = lib.mkForce "me";
wsl.interop.register = true;
environment.systemPackages = [
(pkgs.writeShellScriptBin "pw" ''
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe
''
)
(pkgs.writeShellScriptBin "psh" ''
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe
''
)
];
wsl.nativeSystemd = true;
wsl.wslConf.interop.appendWindowsPath = true;
programs.bash.loginShellInit = "";
services.openssh = {
enable = true;
ports = [ 2222 ];
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
settings.X11Forwarding = true;
extraConfig = ''
X11UseLocalhost no
'';
};
}