ssh8022
This commit is contained in:
parent
5aadaee1d0
commit
c4da312209
@ -364,6 +364,7 @@ in
|
||||
|
||||
services = {
|
||||
sshguard.enable = true;
|
||||
ssh8022.enable = true;
|
||||
gitea.enable = true;
|
||||
hass.enable = true;
|
||||
syncthing-relay.enable = true;
|
||||
|
@ -81,6 +81,8 @@ in
|
||||
|
||||
services = {
|
||||
sshguard.enable = false;
|
||||
ssh8022.enable = true;
|
||||
|
||||
tailscale = {
|
||||
enable = true;
|
||||
verboseLogs = true;
|
||||
|
@ -1,19 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
myData,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = {
|
||||
services.spiped = {
|
||||
enable = true;
|
||||
decrypt = true;
|
||||
source = "*:8022";
|
||||
target = "127.0.0.1:22";
|
||||
keyFile = config.age.secrets.ssh8022.path;
|
||||
};
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
@ -31,11 +23,6 @@
|
||||
] (_: null);
|
||||
in
|
||||
lib.mapAttrs (_name: builtins.intersectAttrs sshAttrs) myData.hosts;
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
|
@ -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 ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user