mailback
This commit is contained in:
parent
719eda9db9
commit
fee2fa1967
|
@ -108,13 +108,13 @@
|
||||||
home = "/home/sondell";
|
home = "/home/sondell";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "sondell";
|
description = "sondell";
|
||||||
extraGroups = ["networkmanager" "wheel" "backup"];
|
extraGroups = ["networkmanager" "wheel" "backup" "opendkim" ];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
firefox
|
firefox
|
||||||
# thunderbird
|
# thunderbird
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
users.groups."backup".gid = 1337;
|
# users.groups."backup".gid = 1337;
|
||||||
|
|
||||||
|
|
||||||
users.users.root = {
|
users.users.root = {
|
||||||
|
|
31
mail.nix
31
mail.nix
|
@ -1,17 +1,39 @@
|
||||||
{ mailserver , ... }:
|
{mailserver, ...}: let
|
||||||
let
|
|
||||||
domain = "sondell.org";
|
domain = "sondell.org";
|
||||||
fqdn = "mail.${domain}";
|
fqdn = "mail.${domain}";
|
||||||
in
|
mailDirectory = "/var/vmail";
|
||||||
{
|
dkimKeyDirectory = "/var/dkim";
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
mailserver
|
mailserver
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.restic.backups = {
|
||||||
|
"mail" = {
|
||||||
|
passwordFile = "/etc/nixos/.secrets/restic_pw";
|
||||||
|
repository = "sftp:Glenn@nas:/home/back/mail/restic";
|
||||||
|
initialize = true;
|
||||||
|
paths = [
|
||||||
|
mailDirectory
|
||||||
|
dkimKeyDirectory
|
||||||
|
];
|
||||||
|
user = "sondell";
|
||||||
|
timerConfig.OnCalendar = "02:05";
|
||||||
|
pruneOpts = [
|
||||||
|
"--keep-daily 10"
|
||||||
|
"--keep-weekly 5"
|
||||||
|
"--keep-monthly 12"
|
||||||
|
"--keep-yearly 75"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
mailserver = {
|
mailserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
inherit mailDirectory dkimKeyDirectory;
|
||||||
fqdn = fqdn;
|
fqdn = fqdn;
|
||||||
domains = [domain];
|
domains = [domain];
|
||||||
|
vmailGroupName = "backup";
|
||||||
|
|
||||||
# A list of all login accounts. To create the password hashes, use
|
# A list of all login accounts. To create the password hashes, use
|
||||||
# cat .secrets/nextadminpw | nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' > .secrets/mailpw.hash
|
# cat .secrets/nextadminpw | nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' > .secrets/mailpw.hash
|
||||||
|
@ -47,5 +69,4 @@ in
|
||||||
$config['smtp_pass'] = "%p";
|
$config['smtp_pass'] = "%p";
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue