diff options
| author | seth <[email protected]> | 2023-05-22 02:35:15 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-05-23 11:05:28 -0400 |
| commit | 630934a2631d9429b4e46c1b6ec0f6640f332384 (patch) | |
| tree | d8bd14cafb0ac382625bc5dca79b84d497e9bab7 /hosts/p-body/nginx.nix | |
| parent | 2cb6cfab9553184c1e6a10303cb832fe96080d00 (diff) | |
!hercules-ci -> hydra
Diffstat (limited to 'hosts/p-body/nginx.nix')
| -rw-r--r-- | hosts/p-body/nginx.nix | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/hosts/p-body/nginx.nix b/hosts/p-body/nginx.nix index 51d06ed..8f2f0da 100644 --- a/hosts/p-body/nginx.nix +++ b/hosts/p-body/nginx.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: let +{config, ...}: let inherit (config.networking) domain; in { networking.firewall.allowedTCPPorts = [80 443]; @@ -15,8 +11,6 @@ in { services.nginx = { enable = true; - additionalModules = [pkgs.nginxModules.fancyindex]; - recommendedGzipSettings = true; recommendedOptimisation = true; recommendedProxySettings = true; @@ -27,28 +21,41 @@ in { virtualHosts = let mkProxy = endpoint: port: { "${endpoint}" = { - proxyPass = "http://127.0.0.1:${port}"; + proxyPass = "http://localhost:${port}"; proxyWebsockets = true; }; }; in { "api.${domain}" = { enableACME = true; - serverAliases = ["www.api.${domain}"]; + addSSL = true; locations = mkProxy "/" "8080"; }; "git.${domain}" = { enableACME = true; - serverAliases = ["www.git.${domain}"]; + addSSL = true; locations = mkProxy "/" "3000"; }; + "hydra.${domain}" = { + enableACME = true; + addSSL = true; + + locations."/" = { + proxyPass = "http://localhost:${toString config.services.hydra.port}"; + extraConfig = '' + add_header Front-End-Https on; + ''; + }; + }; + "grafana.${domain}" = { enableACME = true; - serverAliases = ["www.grafana.${domain}"]; + addSSL = true; + locations = mkProxy "/" "4000"; }; }; |
