use static index
This commit is contained in:
@@ -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
@@ -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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user