mirror of
https://github.com/sstent/vmimages.git
synced 2026-01-25 22:51:49 +00:00
sync
This commit is contained in:
@@ -29,7 +29,7 @@ in {
|
||||
Unit = { Description = "WSL Proxy"; };
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "start-proxy" ''
|
||||
set -x
|
||||
# set -x
|
||||
${pkgs.coreutils}/bin/rm -f /home/sstent/.ssh/wsl-ssh-agent.sock
|
||||
${pkgs.util-linux}/bin/setsid ${pkgs.socat}/bin/socat UNIX-LISTEN:/home/sstent/.ssh/wsl-ssh-agent.sock,fork EXEC:"${pkgs.npiperelay}/bin/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork
|
||||
''}";
|
||||
|
||||
16
modules/nixos/ssh.nix
Normal file
16
modules/nixos/ssh.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ lib, config, pkgs, ... }: {
|
||||
|
||||
#define option to enable this
|
||||
options.mymods.sshd.enable = lib.mkEnableOption "Enable SSH";
|
||||
|
||||
config = lib.mkIf config.mymods.sshd.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.permitRootLogin = "no";
|
||||
settings.passwordAuthentication = false;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user