nixos/dafoe/services/nginx.nix
Leon Vatthauer 61ca79dbd1
Revert
This reverts commit 1219865a7f.
2024-06-17 17:32:13 +02:00

57 lines
1.4 KiB
Nix

{ lib, pkgs, inputs, ... }:
{
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
services.nginx.virtualHosts = let tld = "vatthauer.xyz"; in
{
"git.${tld}" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:3001/";
};
};
};
services.nginx.virtualHosts."vaultwarden.vatthauer.xyz" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:8222/";
};
};
services.nginx.virtualHosts."video.vatthauer.xyz" = {
enableACME = true;
forceSSL = false;
locations."/" = {
proxyPass = "http://localhost:8096";
};
};
services.nginx.virtualHosts."www.vatthauer.xyz" = {
serverAliases = [ "vatthauer.xyz" ];
forceSSL = true;
enableACME = true;
root = pkgs.callPackage ./resumee-website.nix {};
};
services.nginx.virtualHosts."files.vatthauer.xyz" = {
forceSSL = true;
enableACME = true;
locations."/" = {
root = "/var/www";
extraConfig = "autoindex on;";
};
};
services.nginx.virtualHosts."cloud.vatthauer.xyz" = {
forceSSL = true;
enableACME = true;
#locations."/".proxyPass = "http://localhost:8080";
# nextcloud does location setup itself
};
}