From 7cffcaeffef41a8f25c8d1058d4d25be3b586cbf Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 28 Nov 2024 21:47:51 +0000 Subject: [PATCH] nixos: services: tandoor-recipes: persist data --- modules/nixos/services/tandoor-recipes/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/nixos/services/tandoor-recipes/default.nix b/modules/nixos/services/tandoor-recipes/default.nix index 3447bee..ea45e74 100644 --- a/modules/nixos/services/tandoor-recipes/default.nix +++ b/modules/nixos/services/tandoor-recipes/default.nix @@ -83,6 +83,19 @@ in }; }; + my.services.backup = { + paths = [ + "/var/lib/${config.systemd.services.tandoor-recipes.StateDirectory}" + config.systemd.services.tandoor-recipes.environment.MEDIA_ROOT + ]; + }; + + my.system.persist.directories = [ + "/var/lib/${config.systemd.services.tandoor-recipes.StateDirectory}" + config.systemd.services.tandoor-recipes.environment.MEDIA_ROOT + ]; + + # NOTE: unfortunately tandoor-recipes does not log connection failures for fail2ban }; }