aboutsummaryrefslogtreecommitdiff
path: root/hosts/sagittarius/web/blog.nix
blob: 5c02b737722936c5001484796138f6ae8d4094fe (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
{
  inputs,
  pkgs,
  config,
  ...
}:
{
  imports = [ ./acme.nix ];

  services.nginx = {
    enable = true;

    virtualHosts."sorre.xyz" = {
      enableACME = true;
      forceSSL = true;
      root = inputs.sorre-website.packages.${pkgs.system}.default;
      locations."/android" = {
        proxyPass = "http://127.0.0.1:3001/";
        recommendedProxySettings = true;
      };
    };

    virtualHosts."priv.sorre.xyz" = {
      enableACME = true;
      forceSSL = true;
      root = "/var/www/priv";
      basicAuthFile = config.sops.secrets."priv-blog-auth-file".path;
    };
  };
}