Move towards impermanence on Prophet
This commit is contained in:
parent
eb34493b18
commit
9f26c7de39
4 changed files with 88 additions and 65 deletions
|
@ -1,12 +1,16 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
services.roundcube = {
|
||||
enable = config.system.mailserver.enable;
|
||||
hostName = "mail.nixfox.ca";
|
||||
extraConfig = ''
|
||||
$config['smtp_server'] = "tls://mx.nixfox.ca";
|
||||
$config['smtp_user'] = "%u";
|
||||
$config['smtp_pass'] = "%p";
|
||||
'';
|
||||
config = lib.mkIf config.system.mailserver.enable {
|
||||
services.roundcube = {
|
||||
enable = true;
|
||||
hostName = "mail.nixfox.ca";
|
||||
extraConfig = ''
|
||||
$config['smtp_server'] = "tls://mx.nixfox.ca";
|
||||
$config['smtp_user'] = "%u";
|
||||
$config['smtp_pass'] = "%p";
|
||||
'';
|
||||
};
|
||||
|
||||
environment.persistence."/persist".directories = [ "/var/lib/roundcube" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,60 +1,69 @@
|
|||
{ config, pkgs, mailserver, ... }:
|
||||
{ config, lib, pkgs, mailserver, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
mailserver.nixosModule
|
||||
];
|
||||
|
||||
mailserver = rec {
|
||||
enable = config.system.mailserver.enable;
|
||||
domains = [
|
||||
"nixfox.ca"
|
||||
"bloxelcom.net"
|
||||
"freecorn1854.win"
|
||||
"lunamoonlight.xyz"
|
||||
];
|
||||
fqdn = "mx.nixfox.ca";
|
||||
certificateScheme = "acme-nginx";
|
||||
localDnsResolver = false;
|
||||
redis.port = 1515;
|
||||
config = lib.mkIf config.system.mailserver.enable {
|
||||
mailserver = {
|
||||
enable = true;
|
||||
domains = [
|
||||
"nixfox.ca"
|
||||
"bloxelcom.net"
|
||||
"freecorn1854.win"
|
||||
"lunamoonlight.xyz"
|
||||
];
|
||||
fqdn = "mx.nixfox.ca";
|
||||
certificateScheme = "acme-nginx";
|
||||
localDnsResolver = false;
|
||||
redis.port = 1515;
|
||||
|
||||
# Passwords made with 'mkpasswd -sm bcrypt'
|
||||
loginAccounts = {
|
||||
"noreply@nixfox.ca" = {
|
||||
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
|
||||
sendOnly = true;
|
||||
};
|
||||
# Passwords made with 'mkpasswd -sm bcrypt'
|
||||
loginAccounts = {
|
||||
"noreply@nixfox.ca" = {
|
||||
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
|
||||
sendOnly = true;
|
||||
};
|
||||
|
||||
"jimbo@nixfox.ca" = {
|
||||
hashedPasswordFile = pkgs.writeText "jimbo" config.secrets.jimboMailHash;
|
||||
aliases = [
|
||||
"james@nixfox.ca"
|
||||
"jimbo@bloxelcom.net"
|
||||
"jimbo@nixfox.ca" = {
|
||||
hashedPasswordFile = pkgs.writeText "jimbo" config.secrets.jimboMailHash;
|
||||
aliases = [
|
||||
"james@nixfox.ca"
|
||||
"jimbo@bloxelcom.net"
|
||||
|
||||
"vice@nixfox.ca"
|
||||
"vice@bloxelcom.net"
|
||||
"yara@nixfox.ca"
|
||||
"vice@nixfox.ca"
|
||||
"vice@bloxelcom.net"
|
||||
"yara@nixfox.ca"
|
||||
|
||||
"contact@nixfox.ca"
|
||||
];
|
||||
};
|
||||
"contact@nixfox.ca"
|
||||
];
|
||||
};
|
||||
|
||||
"luna@lunamoonlight.xyz" = {
|
||||
hashedPasswordFile = pkgs.writeText "luna" config.secrets.lunaMailHash;
|
||||
aliases = [
|
||||
"luna@bloxelcom.net"
|
||||
"contact@bloxelcom.net"
|
||||
"ibu@bloxelcom.net"
|
||||
];
|
||||
};
|
||||
"luna@lunamoonlight.xyz" = {
|
||||
hashedPasswordFile = pkgs.writeText "luna" config.secrets.lunaMailHash;
|
||||
aliases = [
|
||||
"luna@bloxelcom.net"
|
||||
"contact@bloxelcom.net"
|
||||
"ibu@bloxelcom.net"
|
||||
];
|
||||
};
|
||||
|
||||
"contact@freecorn1854.win" = {
|
||||
hashedPasswordFile = pkgs.writeText "corn" config.secrets.cornMailHash;
|
||||
aliases = [ "freecorn@bloxelcom.net" ];
|
||||
"contact@freecorn1854.win" = {
|
||||
hashedPasswordFile = pkgs.writeText "corn" config.secrets.cornMailHash;
|
||||
aliases = [ "freecorn@bloxelcom.net" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Rspamd port from earlier to avoid overlap
|
||||
services.redis.servers.rspamd.port = 1515;
|
||||
# Rspamd port from earlier to avoid overlap
|
||||
services.redis.servers.rspamd.port = config.mailserver.redis.port;
|
||||
|
||||
environment.persistence."/persist".directories = [
|
||||
"/var/vmail"
|
||||
"/var/lib/dovecot"
|
||||
"/var/lib/postfix"
|
||||
"/var/lib/redis-rspamd"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue