summaryrefslogtreecommitdiff
path: root/parts/systems/atlas/nginx.nix
blob: cdf483d59e445871e4f8d254728bb50d5dbfb74c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
  config,
  self,
  ...
}: let
  inherit (config.networking) domain;
  inherit (self.lib.utils.nginx) mkVHosts mkProxy;
in {
  server = {
    acme.enable = true;
    services.cloudflared.enable = true;
  };

  services.nginx = {
    enable = true;

    recommendedGzipSettings = true;
    recommendedOptimisation = true;
    recommendedProxySettings = true;
    recommendedTlsSettings = true;

    virtualHosts = mkVHosts {
      "miniflux.${domain}" = {
        locations = mkProxy "/" "7000";
      };

      "msix.${domain}" = {
        root = "/var/www/msix";
      };
    };
  };
}