summary refs log tree commit diff stats
path: root/system/services/acme/default.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--system/services/acme/default.nix38
1 files changed, 0 insertions, 38 deletions
diff --git a/system/services/acme/default.nix b/system/services/acme/default.nix
deleted file mode 100644
index 0a0c4ce..0000000
--- a/system/services/acme/default.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{lib, ...}: let
-  domains = import ./domains.nix {};
-
-  virtualHosts = builtins.listToAttrs (
-    builtins.map (domain_name: {
-      name = "acmechallenge.${domain_name}";
-      value = {
-        serverAliases = ["*.${domain_name}"];
-        locations."/.well-known/acme-challenge" = {
-          root = "/var/lib/acme/.challenges";
-        };
-        locations."/" = {
-          return = "301 https://$host$request_uri";
-        };
-      };
-    })
-    domains
-  );
-  certs = lib.attrsets.genAttrs domains (
-    domain_name: {
-      webroot = "/var/lib/acme/.challenges";
-      group = "nginx";
-    }
-  );
-in {
-  users.users.nginx.extraGroups = ["acme"];
-
-  services.nginx = {
-    enable = true;
-    inherit virtualHosts;
-  };
-
-  security.acme = {
-    acceptTerms = true;
-    defaults.email = "admin@vhack.eu";
-    inherit certs;
-  };
-}