LetsEncrypt acme now requires an email and accepting their TOS.

This commit is contained in:
Kevin Baensch 2020-03-11 01:53:04 +01:00
parent 8511968173
commit 6379225731
Signed by: derped
GPG key ID: C0F1D326C7626543
3 changed files with 21 additions and 0 deletions

17
services/acme.nix Normal file
View file

@ -0,0 +1,17 @@
{ options, config, lib, pkgs, ... }:
with builtins;
with lib;
let
fn = import (../. + (toPath "/fn.nix")) { inherit lib; };
cfg = config.machine;
in mkIf (elem "acme" cfg.services) {
security.acme = {
# see https://letsencrypt.org/repository/
acceptTerms = true;
email = fn.fileContentsOr
(toPath "${cfg.secretPath}/acme.mailAddr")
"${(elemAt cfg.mailAccounts 0).name}@${cfg.domain}";
};
}