This commit is contained in:
2023-02-23 10:56:23 -05:00
parent 6ce3be268f
commit 5a0f547441

View File

@@ -1,5 +1,4 @@
{ lib, pkgs, config, modulesPath, ... }:
{
{ lib, pkgs, config, modulesPath, ... }: {
# nixpkgs.overlays = overlays;
# Enable nix flakes
@@ -23,48 +22,46 @@
# docker-desktop.enable = true;
};
mymods = {
user_sstent.enable = true;
};
mymods = { user_sstent.enable = true; };
sops.defaultSopsFile = ./secrets.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.secrets.example_key = {};
sops.secrets.example_key = { };
environment.systemPackages =
[ pkgs.socat
pkgs.npiperelay
#pkgs.wsl-ssh-agent-relay
];
environment.systemPackages = [
pkgs.socat
pkgs.npiperelay
#pkgs.wsl-ssh-agent-relay
];
nixpkgs.config.packageOverrides = pkgs: with pkgs; rec {
nixpkgs.config.packageOverrides = pkgs:
with pkgs; rec {
npiperelay = callPackage ../../pkgs/npiperelay { };
#wsl-ssh-agent-relay = callPackage ../../pkgs/wsl-ssh-agent-relay { };
};
systemd.user.services.ssh-proxy = {
enable = true;
Unit = {
Description = "WSL Proxy";
};
systemd.services.ssh-proxy = {
enable = true;
Unit = { Description = "WSL Proxy"; };
Service = {
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/bin/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork
''}";
};
Install = {
WantedBy = [ "default.target" ];
};
Install = { WantedBy = [ "default.target" ]; };
};
systemd.services.nixs-wsl-systemd-fix = {
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" ];
Before = [
"sysinit.target"
"systemd-tmpfiles-setup-dev.service"
"systemd-tmpfiles-setup.service"
"systemd-sysctl.service"
];
ConditionPathExists = "/dev/shm";
ConditionPathIsSymbolicLink = "/dev/shm";
ConditionPathIsMountPoint = "/run/shm";