Update a lot of options, simplify variables, replace options with tags
This commit is contained in:
parent
dbc0ab6dd3
commit
7667ef9a1b
147 changed files with 663 additions and 928 deletions
|
@ -1,11 +1,75 @@
|
|||
{ lib, ... }:
|
||||
{ config, lib, pkgs, mailserver, ... }:
|
||||
{
|
||||
imports = [
|
||||
./go-autoconfig
|
||||
./radicale
|
||||
./roundcube
|
||||
./simplenix
|
||||
mailserver.nixosModule
|
||||
];
|
||||
|
||||
options.services.mailserver.enable = lib.mkEnableOption "Simple NixOS Mailserver";
|
||||
config = lib.mkIf config.mailserver.enable {
|
||||
mailserver = {
|
||||
fqdn = "mx.${config.vars.mainDomain}";
|
||||
domains = [
|
||||
"nixfox.ca"
|
||||
"bloxelcom.net"
|
||||
"freecorn1854.win"
|
||||
"lunamoonlight.xyz"
|
||||
];
|
||||
certificateScheme = "acme-nginx";
|
||||
localDnsResolver = false;
|
||||
redis.port = 1515;
|
||||
|
||||
# Passwords made with 'mkpasswd -sm bcrypt'
|
||||
loginAccounts = {
|
||||
"jimbo@nixfox.ca" = {
|
||||
hashedPassword = config.secrets.mailHash.bun;
|
||||
aliases = [
|
||||
"james@nixfox.ca"
|
||||
|
||||
"bun@nixfox.ca"
|
||||
"bun@bloxelcom.net"
|
||||
|
||||
"contact@nixfox.ca"
|
||||
];
|
||||
};
|
||||
|
||||
"luna@lunamoonlight.xyz" = {
|
||||
hashedPassword = config.secrets.mailHash.luna;
|
||||
aliases = [
|
||||
"luna@bloxelcom.net"
|
||||
"contact@bloxelcom.net"
|
||||
"ibu@bloxelcom.net"
|
||||
];
|
||||
};
|
||||
|
||||
"contact@freecorn1854.win" = {
|
||||
hashedPassword = config.secrets.mailHash.corn;
|
||||
aliases = [ "freecorn@bloxelcom.net" ];
|
||||
};
|
||||
|
||||
# Noreply emails
|
||||
"noreply@nixfox.ca" = {
|
||||
hashedPassword = config.secrets.mailHash.nixfoxNoReply;
|
||||
sendOnly = true;
|
||||
};
|
||||
"noreply@bloxelcom.net" = {
|
||||
hashedPassword = config.secrets.mailHash.bloxelNoReply;
|
||||
sendOnly = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
redis.servers.rspamd.port = config.mailserver.redis.port;
|
||||
cloudflare-dyndns.domains = [ config.mailserver.fqdn ];
|
||||
};
|
||||
|
||||
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