summaryrefslogtreecommitdiff
path: root/hosts/kay/modules/acme.nix
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-02-08 19:02:22 +0530
committersinanmohd <sinan@sinanmohd.com>2024-02-09 17:19:24 +0530
commit05c7f64bd12d56f3fc066f61fc01351acb0ddb7b (patch)
treec0ba7b4967a18336cfcfaa0574942af3a96ebe95 /hosts/kay/modules/acme.nix
parent08a6d64d9d71489196838ee63ae52a92f0147508 (diff)
kay/acme/rfc2136: init
Diffstat (limited to 'hosts/kay/modules/acme.nix')
-rw-r--r--hosts/kay/modules/acme.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/hosts/kay/modules/acme.nix b/hosts/kay/modules/acme.nix
new file mode 100644
index 0000000..f4ded0a
--- /dev/null
+++ b/hosts/kay/modules/acme.nix
@@ -0,0 +1,23 @@
+{ config, pkgs, ... }: let
+ email = config.userdata.email;
+ domain = config.userdata.domain;
+
+ environmentFile =
+ pkgs.writeText "acme-dns" "RFC2136_NAMESERVER='[2001:470:ee65::1]:53'";
+in {
+ security.acme = {
+ acceptTerms = true;
+ defaults.email = email;
+
+ certs.${domain} = {
+ inherit domain;
+ extraDomainNames = [ "*.${domain}" ];
+
+ dnsProvider = "rfc2136";
+ dnsPropagationCheck = false; # local DNS server
+
+ inherit environmentFile;
+ group = config.services.nginx.group;
+ };
+ };
+}