Fix backup path and remove variables.nix

This commit is contained in:
Daniel Frank 2021-08-12 20:20:21 +02:00
parent b37d0c42d5
commit dfcfff53e1
Signed by: tokudan
GPG key ID: 063CCCAD04182D32
2 changed files with 1 additions and 68 deletions

View file

@ -45,7 +45,7 @@ in
}; };
services.borgbackup.jobs.maildata = { services.borgbackup.jobs.maildata = {
readWritePaths = [ "/var/lib/borgbackup" ]; readWritePaths = [ "/var/lib/borgbackup" ];
paths = "/srv/vmail"; paths = "/var/vmail";
exclude = [ ]; exclude = [ ];
repo = "mail2@host01.hamburg.freifunk.net:maildata"; repo = "mail2@host01.hamburg.freifunk.net:maildata";
prune.keep = { prune.keep = {

View file

@ -1,67 +0,0 @@
{ config, lib, pkgs, ... }:
{
options = {
variables = lib.mkOption {
type = lib.types.attrs;
default = { };
};
};
config.variables = {
dovecotGroup = "dovecot2";
dovecotUser = "dovecot2";
dovecotAuthSocket = "/run/dovecot2/dovecot-auth";
dovecotLmtpSocket = "/run/dovecot2/dovecot-lmtp";
rspamdMilterSocket = "/run/rspamd/milter";
myFQDN = "${config.networking.hostName}.${config.networking.domain}";
pfadminDataDir = "/var/lib/postfixadmin";
pfaGroup = "pfadmin";
pfaPhpfpmHostPort = "127.0.0.1:9000";
pfaUser = "pfadmin";
pfaDomain = "pfa.${config.variables.myFQDN}";
roundcubeFQDN = config.variables.myFQDN;
roundcubeDataDir = "/var/lib/roundcube";
roundcubePhpfpmHostPort = "127.0.0.1:9001";
roundcubeUser = "roundcube";
roundcubeGroup = "roundcube";
useSSL = false;
vmailBaseDir = "/srv/vmail";
vmailGID = 10000;
vmailGroup = "vmail";
vmailUID = 10000;
vmailUser = "vmail";
postfixadminpkgCacheDir = "/var/cache/postfixadmin";
postfixadminpkg = (pkgs.callPackage ./pkg-postfixadmin.nix {
config = (pkgs.writeText "postfixadmin-config.local.php" ''
<?php
$CONF['configured'] = true;
$CONF['setup_password'] = '!';
$CONF['database_type'] = 'sqlite';
$CONF['database_name'] = '${config.variables.pfadminDataDir}/postfixadmin.db';
$CONF['password_expiration'] = 'NO';
$CONF['encrypt'] = 'dovecot:BLF-CRYPT';
$CONF['dovecotpw'] = "${pkgs.dovecot}/bin/doveadm pw";
$CONF['generate_password'] = 'YES';
$CONF['show_password'] = 'NO';
$CONF['quota'] = 'NO';
$CONF['fetchmail'] = 'NO';
$CONF['recipient_delimiter'] = "+";
$CONF['forgotten_user_password_reset'] = false;
$CONF['forgotten_admin_password_reset'] = false;
$CONF['aliases'] = '0';
$CONF['mailboxes'] = '0';
$CONF['default_aliases'] = array (
'abuse' => '${config.variables.mailAdmin}',
'hostmaster' => '${config.variables.mailAdmin}',
'postmaster' => '${config.variables.mailAdmin}',
'webmaster' => '${config.variables.mailAdmin}'
);
$CONF['footer_text'] = "";
$CONF['footer_link'] = "";
$CONF['page_size'] = '100000';
?>
'');
cacheDir = config.variables.postfixadminpkgCacheDir;
} );
};
}