diff options
| author | seth <[email protected]> | 2023-05-14 03:51:29 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-05-14 03:51:29 -0400 |
| commit | f2e62b9f30453afb3b633bc2c1462a406c12afa4 (patch) | |
| tree | 19f50e9b907adfe441f549ebcf64400bf68bab47 /hosts | |
| parent | ed3492f8c10a1324817182f7708cdcf5a7c839d2 (diff) | |
p-body: actually fix guzzle api
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/p-body/default.nix | 2 | ||||
| -rw-r--r-- | hosts/p-body/nginx.nix | 39 |
2 files changed, 23 insertions, 18 deletions
diff --git a/hosts/p-body/default.nix b/hosts/p-body/default.nix index 07dafb7..fb086d8 100644 --- a/hosts/p-body/default.nix +++ b/hosts/p-body/default.nix @@ -26,7 +26,7 @@ services = { guzzle-api = { enable = true; - url = "https://" + config.networking.domain + "/api"; + url = "https://api." + config.networking.domain; port = "8080"; package = guzzle_api.packages.x86_64-linux.guzzle-api-server; }; diff --git a/hosts/p-body/nginx.nix b/hosts/p-body/nginx.nix index 272a349..b7fb016 100644 --- a/hosts/p-body/nginx.nix +++ b/hosts/p-body/nginx.nix @@ -54,24 +54,29 @@ in { enableACME = true; serverAliases = ["www.${domain}"]; - locations = - { - "/" = { - root = - pkgs.writeTextDir "index.html" - '' - <!DOCTYPE html> - <html lang="en"> - <body style="text-align: center;"> - <iframe width="560" height="315" src="https://www.youtube.com/embed/voXpIgb9Nbk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> - </body> - </html> - ''; + locations = { + "/" = { + root = + pkgs.writeTextDir "index.html" + '' + <!DOCTYPE html> + <html lang="en"> + <body style="text-align: center;"> + <iframe width="560" height="315" src="https://www.youtube.com/embed/voXpIgb9Nbk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> + </body> + </html> + ''; - index = "index.html"; - }; - } - // mkProxy "/api" config.services.guzzle-api.port; + index = "index.html"; + }; + }; + }; + + "api.${domain}" = { + enableACME = true; + serverAliases = ["www.api.${domain}"]; + + locations = mkProxy "/" "8080"; }; }; }; |
