aboutsummaryrefslogtreecommitdiff
path: root/infra
diff options
context:
space:
mode:
Diffstat (limited to 'infra')
-rw-r--r--infra/modules/vkcku.com.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/infra/modules/vkcku.com.nix b/infra/modules/vkcku.com.nix
new file mode 100644
index 0000000..92afba3
--- /dev/null
+++ b/infra/modules/vkcku.com.nix
@@ -0,0 +1,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";
+ }
+ ];
+ };
+}