From 91545e73f20e45a197fc4383f2a12d32ffe9c5b2 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 23 Nov 2026 14:59:44 +0000 Subject: ne: init --- systems/ne/acme.nix | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 systems/ne/acme.nix (limited to 'systems/ne/acme.nix') diff --git a/systems/ne/acme.nix b/systems/ne/acme.nix new file mode 100644 index 00000000..c54d487d --- /dev/null +++ b/systems/ne/acme.nix @@ -0,0 +1,39 @@ +{ config, pkgs, ... }: { + security.acme.acceptTerms = true; + + security.acme.certs."viljetic.de" = { + domain = "viljetic.de"; + extraDomainNames = [ + "*.viljetic.de" + ]; + email = "tomislav@viljetic.de"; + reloadServices = [ + "knsupdate-viljetic.de.service" + "nginx.service" + ]; + keyType = "ec384"; + dnsProvider = "rfc2136"; + environmentFile = + # format: + # RFC2136_NAMESERVER=ns1.viljetic.de + # RFC2136_TSIG_ALGORITHM=hmac-sha256. + # RFC2136_TSIG_KEY=acme + # RFC2136_TSIG_SECRET= + "${config.krebs.secret.directory}/lego-knot-credentials"; + }; + + # This is an alternative to + # security.acme.certs."viljetic.de".group = "nginx"; + users.users.nginx.extraGroups = [ "acme" ]; + +/* +Aug 20 11:05:22 ni acme-viljetic.de-start[406499]: 2022/08/20 11:05:22 [INFO] acme: Registering account for tomislav@viljetic.de +Aug 20 11:05:22 ni acme-viljetic.de-start[406499]: !!!! HEADS UP !!!! +Aug 20 11:05:22 ni acme-viljetic.de-start[406499]: Your account credentials have been saved in your Let's Encrypt +Aug 20 11:05:22 ni acme-viljetic.de-start[406499]: configuration directory at "accounts". +Aug 20 11:05:22 ni acme-viljetic.de-start[406499]: You should make a secure backup of this folder now. This +Aug 20 11:05:22 ni acme-viljetic.de-start[406499]: configuration directory will also contain certificates and +Aug 20 11:05:22 ni acme-viljetic.de-start[406499]: private keys obtained from Let's Encrypt so making regular +Aug 20 11:05:22 ni acme-viljetic.de-start[406499]: backups of this folder is ideal. +*/ +} -- cgit v1.3.1