server-configs/machines/gerd/services/fricloud-website.nix

30 lines
847 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
2024-08-11 12:50:32 +00:00
let
svc_domain = config.mine.settings.domain;
in {
services.nginx.virtualHosts."${svc_domain}" = {
forceSSL = true;
enableACME = true;
root = pkgs.writeTextDir "index.html" ''
<html>
<head>
2024-08-11 12:50:32 +00:00
<title>${svc_domain}</title>
</head>
<body>
<marquee
direction="down"
behavior="alternate">
<marquee behavior="alternate">Under Construction</marquee>
</marquee>
</body>
</html>
'';
};
# setup group for fricloud.dk cert + add nginx to group.
2024-08-11 12:50:32 +00:00
# group `main-domain` is used for users that need access to the domain certificate, e.g. murmur
security.acme.certs."${svc_domain}".group = config.users.groups.main-domain.name;
users.groups.main-domain.members = [ config.users.users.nginx.name ];
}