2021-02-06 12:18:55 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2021-02-01 17:33:29 +01:00
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./hardware-configuration.nix
|
|
|
|
../../modules
|
|
|
|
];
|
|
|
|
|
|
|
|
sbruder = {
|
|
|
|
restic.enable = true;
|
2021-02-06 17:10:49 +01:00
|
|
|
wireguard.home = {
|
|
|
|
enable = true;
|
|
|
|
address = "10.80.0.6";
|
|
|
|
};
|
2021-02-05 15:35:42 +01:00
|
|
|
full = false;
|
2021-02-06 12:18:55 +01:00
|
|
|
|
|
|
|
mailserver = {
|
|
|
|
enable = true;
|
|
|
|
fqdn = "vueko.sbruder.de";
|
|
|
|
domains = [
|
|
|
|
"kegelschiene.net"
|
|
|
|
"sbruder.de"
|
|
|
|
];
|
|
|
|
users = import ./secrets/mail-users.nix;
|
|
|
|
rejectSenders = import ./secrets/mail-reject-senders.nix;
|
|
|
|
};
|
2021-02-01 17:33:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
networking.hostName = "vueko";
|
|
|
|
|
|
|
|
system.stateVersion = "20.09";
|
2021-02-06 12:18:55 +01:00
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
|
|
|
|
virtualHosts = {
|
|
|
|
"vueko.sbruder.de" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
};
|
|
|
|
"dav.sbruder.de" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
|
|
locations."/".proxyPass = "http://localhost:5232";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
|
|
80 # HTTP
|
|
|
|
443 # HTTPS
|
|
|
|
];
|
|
|
|
|
|
|
|
services.radicale = {
|
|
|
|
enable = true;
|
|
|
|
config = lib.generators.toINI { } {
|
|
|
|
auth = {
|
|
|
|
type = "htpasswd";
|
|
|
|
htpasswd_encryption = "bcrypt";
|
|
|
|
htpasswd_filename = toString (pkgs.writeText
|
|
|
|
"radicale-htpasswd"
|
|
|
|
(lib.concatMapStringsSep
|
|
|
|
"\n"
|
|
|
|
({ address, passwordHash, ... }: "${address}:${passwordHash}")
|
|
|
|
config.sbruder.mailserver.users));
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-02-01 17:33:29 +01:00
|
|
|
}
|