From 5d11f49ecf05048626227dfe6f758360775b300f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 7 May 2023 13:45:04 -0700 Subject: profile/acme: default DNS provider is gandi Add the API key for gandi to the secrest, create a profile for acme with my defaults. The profile is loaded by tahoe since that's where our services are running on. Update all the servers in nginx to listen on their wireguard interface. --- profiles/acme.nix | 18 ++++++++++++++++++ profiles/nas.nix | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 profiles/acme.nix (limited to 'profiles') diff --git a/profiles/acme.nix b/profiles/acme.nix new file mode 100644 index 0000000..7fc62d3 --- /dev/null +++ b/profiles/acme.nix @@ -0,0 +1,18 @@ +{ pkgs, lib, config, ... }: +let + secrets = config.age.secrets; +in +{ + security.acme.acceptTerms = true; + security.acme.defaults = { + email = "le@fcuny.net"; + dnsProvider = "gandiv5"; + group = config.services.nginx.group; + credentialsFile = secrets."gandi/apikey".path; + dnsPropagationCheck = true; + }; + security.acme.certs."${config.homelab.domain}" = { + domain = "*.${config.homelab.domain}"; + extraDomainNames = [ config.homelab.domain ]; + }; +} diff --git a/profiles/nas.nix b/profiles/nas.nix index d1033af..7dc92da 100644 --- a/profiles/nas.nix +++ b/profiles/nas.nix @@ -1,8 +1,8 @@ { config, pkgs, ... }: { imports = [ - ./server.nix ./btrfs.nix + ./server.nix ]; users.groups.nas.gid = 5000; -- cgit 1.4.1