From 2a18a3d85bd33d45ab1ed03ce2f028c6d4461758 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Fri, 20 Dec 2024 06:32:56 +0300 Subject: [PATCH] Privatebin: Backup data. --- host/x86_64-linux/home/Bind.nix | 1 + host/x86_64-linux/home/Mailserver.nix | 26 ++++++++++----------- host/x86_64-linux/home/nginx/Privatebin.nix | 3 ++- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/host/x86_64-linux/home/Bind.nix b/host/x86_64-linux/home/Bind.nix index 3c9fe999..cbe38f55 100644 --- a/host/x86_64-linux/home/Bind.nix +++ b/host/x86_64-linux/home/Bind.nix @@ -20,6 +20,7 @@ let (mkBind "ovpn" "/var/lib/ovpn") (mkBind "paperless" "/var/lib/paperless") (mkBind "postgres" "/var/lib/postgresql") + (mkBind "privatebin" "/var/lib/privatebin") (mkBind "rabbitmq" "/var/lib/rabbitmq") (mkBind "sieve" "/var/sieve") (mkBind "terraria" "/var/lib/terraria") diff --git a/host/x86_64-linux/home/Mailserver.nix b/host/x86_64-linux/home/Mailserver.nix index 1edad3d7..a970522a 100644 --- a/host/x86_64-linux/home/Mailserver.nix +++ b/host/x86_64-linux/home/Mailserver.nix @@ -121,13 +121,13 @@ in ]; plugins = [ "managesieve" ]; extraConfig = util.trimTabs '' - $config['smtp_server'] = "localhost:25"; - $config['smtp_auth_type'] = null; - $config['smtp_user'] = ""; - $config['smtp_pass'] = ""; - # $config['smtp_user'] = "%u"; - # $config['smtp_pass'] = "%p"; - ''; + $config['smtp_server'] = "localhost:25"; + $config['smtp_auth_type'] = null; + $config['smtp_user'] = ""; + $config['smtp_pass'] = ""; + # $config['smtp_user'] = "%u"; + # $config['smtp_pass'] = "%p"; + ''; }; }; @@ -139,20 +139,20 @@ in }; path = [ pkgs.dovecot ]; script = util.trimTabs '' - doveadm expunge -A mailbox Junk SENTBEFORE 7d - doveadm expunge -A mailbox Trash SENTBEFORE 30d - doveadm expunge -u trash@voronind.com mailbox Inbox SENTBEFORE 30d - doveadm purge -A - ''; + doveadm expunge -A mailbox Junk SENTBEFORE 7d + doveadm expunge -A mailbox Trash SENTBEFORE 30d + doveadm expunge -u trash@voronind.com mailbox Inbox SENTBEFORE 30d + doveadm purge -A + ''; }; timers.autoexpunge = { + wantedBy = [ "timers.target" ]; timerConfig = { OnCalendar = "daily"; Persistent = true; Unit = "autoexpunge.service"; }; - wantedBy = [ "timers.target" ]; }; }; } diff --git a/host/x86_64-linux/home/nginx/Privatebin.nix b/host/x86_64-linux/home/nginx/Privatebin.nix index b5888473..d64ba491 100644 --- a/host/x86_64-linux/home/nginx/Privatebin.nix +++ b/host/x86_64-linux/home/nginx/Privatebin.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ "paste.voronind.com" = { extraConfig = '' listen 443 ssl;