Initial commit.
This commit is contained in:
commit
67823cbed6
51 changed files with 1714 additions and 0 deletions
39
roles/traefik.nix
Normal file
39
roles/traefik.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.traefik = {
|
||||
enable = true;
|
||||
staticConfigOptions = {
|
||||
providers = {
|
||||
docker = { };
|
||||
};
|
||||
entryPoints = {
|
||||
web = {
|
||||
address = ":80";
|
||||
asDefault = true;
|
||||
http.redirections.entrypoint = {
|
||||
to = "websecure";
|
||||
scheme = "https";
|
||||
};
|
||||
};
|
||||
|
||||
websecure = {
|
||||
address = ":443";
|
||||
asDefault = true;
|
||||
http.tls.certResolver = "letsencrypt";
|
||||
};
|
||||
};
|
||||
|
||||
certificatesResolvers.letsencrypt.acme = {
|
||||
email = "nolan@thewordnerd.info";
|
||||
storage = "${config.services.traefik.dataDir}/acme.json";
|
||||
httpChallenge.entryPoint = "web";
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
users.users.traefik.extraGroups = [ "podman" ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue