diff options
| author | Franck Cuny <franck@fcuny.net> | 2025-07-17 07:35:07 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2025-07-17 07:35:07 -0700 |
| commit | ed3ffb4b66b21fee7c17b88ab63fc13439fa2293 (patch) | |
| tree | e84b6cb043a50050b1e9066c661fca9ba93ac3a7 /src | |
| parent | import my website under `src` (diff) | |
| download | infra-ed3ffb4b66b21fee7c17b88ab63fc13439fa2293.tar.gz | |
build and deploy my personal website on the VM
Diffstat (limited to 'src')
| -rw-r--r-- | src/fcuny.net/default.nix | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/fcuny.net/default.nix b/src/fcuny.net/default.nix index b34bfe0..6ace901 100644 --- a/src/fcuny.net/default.nix +++ b/src/fcuny.net/default.nix @@ -17,7 +17,6 @@ let buildPhase = '' zola build - lychee docs/*.html ''; installPhase = '' @@ -31,36 +30,9 @@ let cd src/fcuny.net ${pkgs.zola}/bin/zola serve --interface 0.0.0.0 --port 1111 ''; - - # Nginx configuration - nginxConfig = pkgs.writeText "fcuny-net.conf" '' - server { - listen 80; - server_name fcuny.net; - - root ${site}; - index index.html; - - location / { - try_files $uri $uri/ =404; - } - - # Optional: Add some basic security headers - add_header X-Frame-Options "SAMEORIGIN" always; - add_header X-Content-Type-Options "nosniff" always; - add_header X-XSS-Protection "1; mode=block" always; - - # Cache static assets - location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg)$ { - expires 1y; - add_header Cache-Control "public, immutable"; - } - } - ''; - in { - inherit site serve nginxConfig; + inherit site serve; # Make site the default output default = site; |
