From cf02da0d00378ccbf8b836206956ecb069a310cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Tue, 12 Mar 2024 05:58:36 +0100 Subject: [PATCH] acme: Back up SSL certificates --- configuration/nginx.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configuration/nginx.nix b/configuration/nginx.nix index 5315ae6..14ba9d9 100644 --- a/configuration/nginx.nix +++ b/configuration/nginx.nix @@ -50,4 +50,11 @@ defaults.email = "tm@tlater.net"; acceptTerms = true; }; + + services.backups.acme = { + user = "acme"; + paths = + lib.mapAttrsToList (virtualHost: _: "/var/lib/acme/${virtualHost}") + config.services.nginx.virtualHosts; + }; }