summaryrefslogtreecommitdiff
path: root/services/website.nix
diff options
context:
space:
mode:
Diffstat (limited to 'services/website.nix')
-rw-r--r--services/website.nix41
1 files changed, 32 insertions, 9 deletions
diff --git a/services/website.nix b/services/website.nix
index d36f538..784f3b3 100644
--- a/services/website.nix
+++ b/services/website.nix
@@ -1,14 +1,37 @@
{ webroot }: { config, lib, pkgs, ... }:
+let
+fqdn = "crashoverburn.com";
+in
{
- services.nginx.enable = true;
- services.nginx.virtualHosts."crashoverburn.com" = {
- addSSL = true;
- enableACME = true;
- root = webroot;
+ users.users.nginx.extraGroups = [ "acme" ];
+ security.acme.certs."${fqdn}" =
+ {
+ extraDomainNames= map (x: "${x}.${fqdn}")
+ [
+ "pubsub"
+ "proxy"
+ "upload"
+ "conference"
+ "social"
+ "pics.social"
+ ];
+ webroot = "/var/lib/acme/acme-challenge/";
};
- services.nginx.virtualHosts."crashoverburn.online" = {
- addSSL = true;
- enableACME = true;
- root = webroot;
+ services.nginx = {
+ enable = true;
+ virtualHosts = {
+ "${fqdn}" = {
+ forceSSL = true;
+ enableACME = true;
+ #useACMEHost = "crashoverburn.com";
+ locations."/".root = webroot;
+ };
+ "crashoverburn.online" = {
+ forceSSL = true;
+ #useACMEHost = "crashoverburn.com";
+ enableACME = true;
+ locations."/".root = webroot;
+ };
+ };
};
}