From dd8c7976e8ded4c698b47b08494878c611a663c1 Mon Sep 17 00:00:00 2001 From: Chris Toph Date: Sat, 7 Sep 2024 17:40:30 -0400 Subject: [PATCH] Fixed acme, now correctly using cloudflare for certs --- nixos/modules/acme/cloudflare.ini.example | 1 + nixos/modules/acme/default.nix | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 nixos/modules/acme/cloudflare.ini.example diff --git a/nixos/modules/acme/cloudflare.ini.example b/nixos/modules/acme/cloudflare.ini.example new file mode 100644 index 0000000..3bb6b44 --- /dev/null +++ b/nixos/modules/acme/cloudflare.ini.example @@ -0,0 +1 @@ +CF_DNS_API_TOKEN= \ No newline at end of file diff --git a/nixos/modules/acme/default.nix b/nixos/modules/acme/default.nix index 0b700d3..1782ce6 100644 --- a/nixos/modules/acme/default.nix +++ b/nixos/modules/acme/default.nix @@ -1,10 +1,17 @@ -{ - # TODO: find out how to add the certs from my nginx doxker since this jurs errors always - - # letsencrypt this wont do shit but allows things to work - # i take care of this on dockge lxc +{ config, lib, pkgs, ... }: { + + # letsencrypt security.acme = { acceptTerms = true; - defaults.email = "chris@toph.cc"; + defaults = { + email = "chris@toph.cc"; + dnsProvider = "cloudflare"; + environmentFile = ./cloudflare.ini; + }; + certs = { + "ryot.foo" = { + extraDomainNames = ["*.ryot.foo"]; + }; + }; }; } \ No newline at end of file