ssh8022
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
./photoprism
|
||||
./postfix
|
||||
./remote-builder
|
||||
./ssh8022
|
||||
./sshguard
|
||||
./syncthing
|
||||
./syncthing-relay
|
||||
|
||||
34
modules/services/ssh8022/default.nix
Normal file
34
modules/services/ssh8022/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
myData,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.mj.services.ssh8022;
|
||||
in
|
||||
{
|
||||
options.mj.services.ssh8022 = {
|
||||
enable = lib.mkEnableOption "Enable ssh8022";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.spiped = {
|
||||
enable = true;
|
||||
config = {
|
||||
ssh8022 = {
|
||||
decrypt = true;
|
||||
source = "*:8022";
|
||||
target = "127.0.0.1:22";
|
||||
keyfile = config.age.secrets.ssh8022.path;
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.ssh.extraConfig = ''
|
||||
Host dl.jakstys.lt
|
||||
ProxyCommand ${pkgs.spiped}/bin/spipe -t %h:8022 -k ${config.age.secrets.ssh8022.path}
|
||||
'';
|
||||
networking.firewall.allowedTCPPorts = [ myData.ports.ssh8022 ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user