mirror of
https://github.com/sstent/vmimages.git
synced 2026-01-25 14:41:44 +00:00
46 lines
1.0 KiB
Nix
46 lines
1.0 KiB
Nix
{ lib, pkgs, config, modulesPath, ... }:
|
|
{
|
|
|
|
# Enable nix flakes
|
|
nix.package = pkgs.nixFlakes;
|
|
nix.extraOptions = ''
|
|
experimental-features = nix-command flakes
|
|
'';
|
|
|
|
system.stateVersion = "22.11";
|
|
|
|
wsl = {
|
|
enable = true;
|
|
wslConf.automount.root = "/mnt";
|
|
defaultUser = "sstent";
|
|
startMenuLaunchers = true;
|
|
interop.preserveArgvZero = true;
|
|
|
|
# Enable native Docker support
|
|
# docker-native.enable = true;
|
|
|
|
# Enable integration with Docker Desktop (needs to be installed)
|
|
# docker-desktop.enable = true;
|
|
};
|
|
|
|
mymods = {
|
|
user_sstent.enable = true;
|
|
};
|
|
|
|
environment.systemPackages =
|
|
[ pkgs.socat];
|
|
|
|
|
|
systemd.user.services.ssh-proxy = {
|
|
Description = "WSL Proxy";
|
|
serviceConfig = {
|
|
ExecStart = "${pkgs.writeShellScript "start-proxy" ''
|
|
rm -f /tmp/.ssh-sock
|
|
setsid ${pkgs.socat}/bin/socat UNIX-LISTEN:/tmp/.ssh-sock,fork EXEC:"/mnt/c/Windows/system32/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork
|
|
''}";
|
|
};
|
|
WantedBy = [ "default.target" ];
|
|
};
|
|
|
|
|
|
} |