From f0e51b302d6f0a5450519cea7cbf39427091a416 Mon Sep 17 00:00:00 2001 From: Philip Peterson <1326208+philip-peterson@users.noreply.github.com> Date: Mon, 5 May 2025 19:09:26 -0700 Subject: [PATCH] Add portfolio --- nixos/cloned_repos/default.nix | 4 ++++ nixos/nginx.nix | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/nixos/cloned_repos/default.nix b/nixos/cloned_repos/default.nix index f597719..0aec1a5 100644 --- a/nixos/cloned_repos/default.nix +++ b/nixos/cloned_repos/default.nix @@ -34,6 +34,10 @@ ["atcsim"] "git@github.com:philip-peterson/ATC-Sim.git" "master") + (makeConfigFile + ["my-portfolio"] + "git@github.com:philip-peterson/my-portfolio.git" + "main") ]; configDir = diff --git a/nixos/nginx.nix b/nixos/nginx.nix index d637ca5..0e7aed8 100644 --- a/nixos/nginx.nix +++ b/nixos/nginx.nix @@ -34,6 +34,12 @@ ''; }; + locations."/games/atcsim" = { + extraConfig = '' + return 301 /games/atcsim/; + ''; + }; + locations."~ ^/games/atcsim(/[^/\\s]*)*$" = { extraConfig = '' index index.html index.htm; @@ -43,6 +49,21 @@ ''; }; + locations."/portfolio" = { + extraConfig = '' + return 301 /portfolio/; + ''; + }; + + locations."~ ^/portfolio/" = { + extraConfig = '' + index index.html index.htm; + rewrite ^/portfolio/?$ "/index.html" break; + rewrite ^/portfolio(?(/[^/\\s]*)*)$ "$query" break; + root /etc/pullomatic/my-portfolio; + ''; + }; + locations."~ ^/echo(?((/[^/\\s]*)*))$" = { extraConfig = '' add_header Content-Type text/plain;