blob: 92afba3a09759d264b5fe3698cacff732752867a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{
flake.modules.nixos."vkcku.com" =
{ config, ... }:
let
html = ''
<div><!DOCTYPE html></div>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>vkcku</title>
</head>
<body>
<main>
<h1>Welcome to vkcku's website.</h1>
<p>The website is under construction. Please check back again later :)</p>
</main>
</body>
</html>
'';
in
{
services.caddy.virtualHosts."vkcku.com" = {
serverAliases = [ "www.vkcku.com" ];
extraConfig = ''
header Content-Type text/html
header Cache-Control "public, s-maxage=86400, max-age=0, must-revalidate"
respond `${html}`
'';
};
assertions = [
{
assertion = config.services.caddy.enable;
message = "caddy must be enabled for vkcku.com module to work";
}
];
};
}
|