From b99248b210021f692e8f815fc70bf35f7bc6735d Mon Sep 17 00:00:00 2001 From: James Walker Date: Thu, 6 Oct 2022 14:56:18 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20add=20traefik=20for=20internal=20tl?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/plato/configuration.nix | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/hosts/plato/configuration.nix b/hosts/plato/configuration.nix index 9eda78c..9a14159 100644 --- a/hosts/plato/configuration.nix +++ b/hosts/plato/configuration.nix @@ -105,6 +105,42 @@ networking.firewall.enable = false; walkah.coredns = { enable = true; }; + services.traefik = { + enable = true; + group = "docker"; + staticConfigOptions = { + api = { }; + certificatesResolvers = { + myresolver = { + acme = { + email = "walkah@walkah.net"; + storage = "/var/lib/traefik/acme.json"; + dnsChallenge = { + provider = "cloudflare"; + }; + }; + }; + }; + entryPoints = { + web = { + address = ":80"; + + }; + websecure = { + address = ":443"; + + }; + }; + providers = { + docker = { }; + }; + }; + }; + systemd.services.traefik = { + serviceConfig = { + EnvironmentFile = "/var/lib/traefik/env"; + }; + }; services = { borgbackup.jobs."borgbase" = {