]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/mail/postfix.nix
Add backup module
[perso/Immae/Config/Nix.git] / modules / private / mail / postfix.nix
index 2dccc41fedbcd9041b893808dee2c430d65d027a..edfd19652e88f46606e8b807221d70617ff44048 100644 (file)
@@ -1,5 +1,8 @@
 { lib, pkgs, config, myconfig,  ... }:
 {
+  config.services.backup.profiles.mail.excludeFile = ''
+    + /var/lib/postfix
+    '';
   config.secrets.keys = [
     {
       dest = "postfix/mysql_alias_maps";
@@ -73,6 +76,7 @@
           WHERE
             ((regex = 1 AND '%s' REGEXP CONCAT('^',source,'$') ) OR (regex = 0 AND source = '%s'))
             AND active = 1
+          UNION SELECT '%s' AS destination
         '';
     }
   ];