all repos — nixfiles @ f31b63ac610c943cae43ea15a6dc9910099b4f92

System and user configuration, managed by nix and home-manager

system/roles/opia/wiki.nix (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ config, ... }:
let
  domain = "opia.ovh";
  subdomain = "wiki";
in
{
  services.gollum = {
    enable = true;
    emoji = true;
    branch = "main";
  };

  services.caddy.virtualHosts."${subdomain}.${domain}" = {
    extraConfig = ''
      tls {
        dns_challenge_override_domain _acme-challenge.${subdomain}.opia.${config.networking.domain}
      }
      encode zstd gzip
      reverse_proxy localhost:${toString config.services.gollum.port}

      import tg_auth
    '';
  };
}