Nix-Config/system/shared/services/nginx.nix

37 lines
749 B
Nix

{ config, pkgs, inputs, ... }:
{
services.nginx = {
enable = true;
gitweb = {
enable = true;
virtualHost = "git.tsvallender.co.uk";
location = "/home/tsv/git";
};
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."syncthing.tsvallender.co.uk" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8384";
};
};
virtualHosts."git.tsvallender.co.uk" = {
forceSSL = true;
enableACME = true;
};
};
security.acme = {
acceptTerms = true;
defaults = {
email = "t+acme@tsvallender.co.uk";
};
};
}