diff options
| author | vkcku <[email protected]> | 2026-06-02 08:07:09 +0530 |
|---|---|---|
| committer | vkcku <[email protected]> | 2026-06-02 08:07:09 +0530 |
| commit | 876f1b2c35d23d707d3de0b3c3ec2625510cdc6d (patch) | |
| tree | 1c4b9922d8bc42dc2b518a82e5eab6bdab131df4 | |
| parent | infra(indra): enable caddy (diff) | |
infra: add vkcku.com module
monorepo-revid: 71b2508ddf4ba4b38c31f2389bf510c2ed501e0d
| -rw-r--r-- | infra/modules/vkcku.com.nix | 39 |
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"; + } + ]; + }; +} |
