nixos/services/traefik/gitea.nix
Evie Litherland-Smith 320d76f972 Move server directory and syncthing into services directory
Separate service setup from traefik config for each, prep for future
server separation
2023-05-26 08:52:46 +01:00

29 lines
853 B
Nix

{...}: {
imports = [./default.nix];
services.traefik.dynamicConfigOptions = {
http = {
routers.gitea = {
rule = "Host(`git.xenia.me.uk`)";
entryPoints = ["http" "https"];
service = "gitea-websecure";
tls = {certResolver = "default";};
};
services.gitea-websecure.loadBalancer.servers = [{url = "http://localhost:3000";}];
};
tcp = {
routers.gitea-ssh = {
rule = "HostSNI(`git.xenia.me.uk`)";
entryPoints = ["ssh"];
service = "gitea-sshservice";
tls = {certResolver = "default";};
};
routers.gitea-ssh-local = {
rule = "ClientIP(`192.168.0.0/16`)";
entryPoints = ["ssh"];
service = "gitea-sshservice";
};
services.gitea-sshservice.loadBalancer.servers = [{address = "localhost:30922";}];
};
};
}