diff options
| author | seth <[email protected]> | 2023-05-14 03:30:37 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-05-14 03:30:37 -0400 |
| commit | dc91edd0ac2c922aafc7a5365ca6ed5677b838f2 (patch) | |
| tree | 2e0d27749c09f8e16c7078f4d60c5a857e72c7ee /hosts/p-body | |
| parent | f0cca0f7be349aeede7a953e2e8d3143f010c09e (diff) | |
p-body: add new domain
Diffstat (limited to 'hosts/p-body')
| -rw-r--r-- | hosts/p-body/default.nix | 2 | ||||
| -rw-r--r-- | hosts/p-body/nginx.nix | 43 |
2 files changed, 25 insertions, 20 deletions
diff --git a/hosts/p-body/default.nix b/hosts/p-body/default.nix index 16128e4..b396a90 100644 --- a/hosts/p-body/default.nix +++ b/hosts/p-body/default.nix @@ -19,7 +19,7 @@ }; networking = { - domain = "167.99.145.73"; + domain = "mydadleft.me"; hostName = "p-body"; }; diff --git a/hosts/p-body/nginx.nix b/hosts/p-body/nginx.nix index 328e6e4..272a349 100644 --- a/hosts/p-body/nginx.nix +++ b/hosts/p-body/nginx.nix @@ -1,4 +1,8 @@ -{config, ...}: let +{ + config, + pkgs, + ... +}: let inherit (config.networking) domain; in { security.acme = { @@ -38,35 +42,36 @@ in { # Enable XSS protection of the browser. # May be unnecessary when CSP is configured properly (see above) add_header X-XSS-Protection "1; mode=block"; - - # This might create errors - proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict"; - ''; virtualHosts = let - common = { - forceSSL = false; - enableACME = false; - }; - mkProxy = endpoint: port: { "${endpoint}".proxyPass = "http://127.0.0.1:${port}"; }; in { "${domain}" = { - inherit (common) enableACME forceSSL; - default = true; + enableACME = true; serverAliases = ["www.${domain}"]; - locations = mkProxy "/" config.services.guzzle-api.port; - #{ - # "/" = { - # root = "/var/www"; - # }; - #}; - #// mkProxy "/api" config.services.guzzle-api.port; + 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; }; }; }; |
