use static index

This commit is contained in:
2025-08-24 00:02:38 -05:00
parent 7f78faf195
commit 62d361834f
2 changed files with 37 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>NIMH Static Test</title>
<style>
body {
font-family: sans-serif;
text-align: center;
margin-top: 50px;
}
h1 {
color: #4CAF50;
}
</style>
</head>
<body>
<h1>Welcome to nimh.roypository.com!</h1>
<p>This is a barebones static site served via Nginx on NixOS.</p>
</body>
</html>
+15 -1
View File
@@ -1,5 +1,11 @@
{ config, lib, pkgs, meta, ... }:
let
nimhStaticSite = pkgs.runCommand "nimh-static-site" { } ''
mkdir -p $out
cp -r ${../homelab-services/nimh-static}/* $out/
'';
in
{
imports = [ ];
@@ -70,6 +76,8 @@
};
};
# Setup vhosts via nginx
services.nginx = {
enable = true;
@@ -86,7 +94,13 @@
forceSSL = true;
useACMEHost = "roypository.com";
locations = { };
locations."/" = {
root = nimhStaticSite;
index = "index.html";
extraConfig = ''
autoindex off;
'';
};
};
};