Restructure folders
This commit is contained in:
parent
76edda7833
commit
bb394d63a6
79 changed files with 7 additions and 331 deletions
9
config/hosts/mail/services/acme.nix
Normal file
9
config/hosts/mail/services/acme.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
email = "admin+certs@graven.dev";
|
||||
};
|
||||
}
|
||||
|
25
config/hosts/mail/services/mail.nix
Normal file
25
config/hosts/mail/services/mail.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(builtins.fetchTarball {
|
||||
# Pick a commit from the branch you are interested in
|
||||
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/5675b122a947b40e551438df6a623efad19fd2e7/nixos-mailserver-5675b122a947b40e551438df6a623efad19fd2e7.tar.gz";
|
||||
# And set its hash
|
||||
sha256 = "1fwhb7a5v9c98nzhf3dyqf3a5ianqh7k50zizj8v5nmj3blxw4pi";
|
||||
})
|
||||
];
|
||||
|
||||
mailserver = {
|
||||
enable = true;
|
||||
fqdn = "mail.graven.dev";
|
||||
domains = [ "anarkafem.dev" ];
|
||||
|
||||
loginAccounts = {
|
||||
"noreply@anarkafem.dev" = {
|
||||
hashedPasswordFile = config.secrets.files.mail_noreply_anarkafem_dev.file;
|
||||
};
|
||||
};
|
||||
certificateScheme = 3;
|
||||
};
|
||||
}
|
17
config/hosts/mail/services/restic.nix
Normal file
17
config/hosts/mail/services/restic.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
|
||||
services.restic.backups = {
|
||||
"mail" = {
|
||||
paths = [ "/var/vmail" ];
|
||||
repository = "sftp:restic@despondos.nao.sh:/etheria/backup/mail/mail";
|
||||
initialize = true;
|
||||
pruneOpts = [ "--keep-daily 7" "--keep-weekly 5" "--keep-monthly 12" "--keep-yearly 75" ];
|
||||
timerConfig = { "OnCalendar" = "02:15"; };
|
||||
extraOptions = [ "sftp.command='ssh restic@despondos.nao.sh -i ${config.secrets.files.ssh_key.file} -s sftp'" ];
|
||||
passwordFile = builtins.toString config.secrets.files.restic_pass.file;
|
||||
user = "virtualMail";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue