nixos/services/traefik/sshd.nix

12 lines
304 B
Nix
Raw Normal View History

2023-05-17 17:10:18 +01:00
{...}: {
imports = [./default.nix];
services.traefik.dynamicConfigOptions.tcp = {
routers.ssh = {
rule = "ClientIP(`192.168.0.0/16`)";
entryPoints = ["ssh"];
service = "ssh-redirect";
};
services.ssh-redirect.loadBalancer.servers = [{address = "localhost:22";}];
};
}