clan-infra/modules/web01/homepage.nix

33 lines
697 B
Nix
Raw Normal View History

2023-07-05 09:13:05 +00:00
{ pkgs, ... }: {
2023-07-04 17:40:45 +00:00
security.acme.defaults.email = "admins@clan.lol";
security.acme.acceptTerms = true;
services.nginx = {
virtualHosts."clan.lol" = {
forceSSL = true;
enableACME = true;
2023-07-05 09:13:05 +00:00
root = pkgs.runCommand "clan.lol" { } ''
2023-07-04 17:40:45 +00:00
mkdir -p $out;
cat > $out/index.html <<EOF
<html>
<head>
<title>Clan</title>
</head>
<body><h1>Clan</h1></body>
</html>
EOF
'';
extraConfig = ''
charset utf-8;
source_charset utf-8;
'';
};
virtualHosts."www.clan.lol" = {
forceSSL = true;
enableACME = true;
globalRedirect = "clan.lol";
};
};
}