2019-10-08 13:15:38 +02:00
|
|
|
{ config, lib, ... }:
|
2019-03-23 02:50:48 +01:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2019-10-08 13:15:38 +02:00
|
|
|
let
|
|
|
|
cfg = config.machine;
|
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
../../options/machine.nix
|
|
|
|
../../options/mailman3/options.nix
|
2019-03-23 02:50:48 +01:00
|
|
|
];
|
|
|
|
|
2019-10-08 13:15:38 +02:00
|
|
|
config.machine = rec {
|
2019-03-23 02:50:48 +01:00
|
|
|
hostName = "CDServer";
|
2019-10-08 13:15:38 +02:00
|
|
|
domain = "countdown-dresden.de";
|
|
|
|
extraDomains = [ "iz-ev.de" "clubduererstrasse.de" ];
|
|
|
|
administrators = [
|
|
|
|
{ name = "kevin"; id = 1337; }
|
|
|
|
{ name = "reinhold"; id= 1000; }
|
|
|
|
];
|
|
|
|
mailAccounts = import "${cfg.secretPath}/mailAccounts.nix";
|
|
|
|
allowUnfree = false;
|
2019-03-23 02:50:48 +01:00
|
|
|
conffiles = [
|
|
|
|
"etcvars"
|
2019-10-08 13:15:38 +02:00
|
|
|
"security"
|
2019-03-23 02:50:48 +01:00
|
|
|
"zsh"
|
|
|
|
];
|
|
|
|
pkgs = [
|
|
|
|
"base"
|
|
|
|
"server"
|
|
|
|
];
|
|
|
|
services = [
|
2019-10-08 13:15:38 +02:00
|
|
|
"fail2ban"
|
|
|
|
"gitea"
|
|
|
|
"mailserver"
|
2019-03-23 02:50:48 +01:00
|
|
|
"mariaDB"
|
2019-10-08 13:15:38 +02:00
|
|
|
"nextcloud"
|
2019-03-23 02:50:48 +01:00
|
|
|
"nginx"
|
|
|
|
"openssh"
|
2019-10-08 13:15:38 +02:00
|
|
|
# "cd-internes"
|
|
|
|
# "docker"
|
2019-03-23 02:50:48 +01:00
|
|
|
];
|
2019-10-08 13:15:38 +02:00
|
|
|
vHosts = (flatten (map (base: [
|
|
|
|
{ domain = base; service = "simple"; }
|
|
|
|
{ domain = "storage.${base}"; service = "nextcloud"; }
|
|
|
|
{ domain = "mail.${base}"; service = "mail"; }
|
|
|
|
{ domain = "git.${base}"; service = "gitea"; }
|
|
|
|
]) ([ domain ] ++ extraDomains)));
|
2019-03-23 02:50:48 +01:00
|
|
|
firewall = {
|
2019-08-27 16:24:59 +02:00
|
|
|
enable = true;
|
2019-03-23 02:50:48 +01:00
|
|
|
allowPing = false;
|
|
|
|
allowedUDPPorts = [ 22 80 443 ];
|
|
|
|
allowedTCPPorts = [ 80 443 ];
|
|
|
|
};
|
|
|
|
};
|
2019-10-08 13:15:38 +02:00
|
|
|
config.services.mailman3 = {
|
|
|
|
enable = true;
|
|
|
|
site_owner = "derped@ophanim.de";
|
|
|
|
database = {
|
|
|
|
type = "mysql";
|
|
|
|
name = "mailman3";
|
|
|
|
user = "mailman3";
|
|
|
|
host = "localhost";
|
|
|
|
port = 3306;
|
|
|
|
passwordFile = "${cfg.secretPath}/mailman3_db";
|
|
|
|
};
|
|
|
|
mta = {
|
|
|
|
lmtp_host = "mail.ophanim.de";
|
|
|
|
smtp_host = "mail.ophanim.de";
|
|
|
|
smtp_user = "mailman3";
|
|
|
|
smtp_passFile = "${cfg.secretPath}/mailman3_mail";
|
|
|
|
};
|
|
|
|
};
|
2019-03-23 02:50:48 +01:00
|
|
|
}
|