This commit is contained in:
2023-02-20 13:20:26 +00:00
parent 5720d17f07
commit 9755a8f568
3 changed files with 27 additions and 7 deletions

4
flake.lock generated
View File

@@ -246,11 +246,11 @@
"locked": {
"lastModified": 1,
"narHash": "sha256-jYKyhSKWW8XZHwETg4ix7lGrfQdcd3bwNWq9Jdn0WtU=",
"path": "pkgs/npiperelay",
"path": "./pkgs/npiperelay",
"type": "path"
},
"original": {
"path": "pkgs/npiperelay",
"path": "./pkgs/npiperelay",
"type": "path"
}
},

View File

@@ -75,7 +75,7 @@
];
specialArgs = {
inherit inputs myData;
inherit inputs myData overlays;
};
};

View File

@@ -1,12 +1,12 @@
{ lib, pkgs, config, modulesPath, ... }:
{ lib, pkgs, config, modulesPath, overlays, ... }:
{
nixpkgs.overlays = overlays;
# Enable nix flakes
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
system.stateVersion = "22.11";
wsl = {
@@ -15,7 +15,7 @@
defaultUser = "sstent";
startMenuLaunchers = true;
interop.preserveArgvZero = true;
nativeSystemd = true;
# Enable native Docker support
# docker-native.enable = true;
@@ -36,11 +36,31 @@ systemd.user.services.ssh-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/ProgramData/chocolatey/lib/npiperelay/tools/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork
setsid ${pkgs.socat}/bin/socat UNIX-LISTEN:/tmp/.ssh-sock,fork EXEC:"/run/current-system/sw/bin/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork
''}";
};
wantedBy = [ "default.target" ];
};
#pkgs.callPackage ./npiperelay.nix {};
systemd.services.nixs-wsl-systemd-fix = {
description = "Fix the /dev/shm symlink to be a mount";
unitConfig = {
DefaultDependencies = "no";
Before = [ "sysinit.target" "systemd-tmpfiles-setup-dev.service" "systemd-tmpfiles-setup.service" "systemd-sysctl.service" ];
ConditionPathExists = "/dev/shm";
ConditionPathIsSymbolicLink = "/dev/shm";
ConditionPathIsMountPoint = "/run/shm";
};
serviceConfig = {
Type = "oneshot";
ExecStart = [
"${pkgs.coreutils-full}/bin/rm /dev/shm"
"/run/wrappers/bin/mount --bind -o X-mount.mkdir /run/shm /dev/shm"
];
};
wantedBy = [ "sysinit.target" ];
};
}