nixos-config/machines/vueko/configuration.nix

87 lines
1.8 KiB
Nix
Raw Normal View History

2021-02-06 12:18:55 +01:00
{ config, lib, pkgs, ... }:
2021-05-01 16:30:48 +02:00
{
imports = [
./hardware-configuration.nix
../../modules
./services/fuuko-proxy.nix
./services/media.nix
./services/restic.nix
];
sbruder = {
2021-03-05 16:00:10 +01:00
nginx.hardening.enable = true;
restic.system.enable = true;
wireguard.home.enable = true;
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"
2022-09-13 09:11:02 +02:00
"psycho-power-papagei.de"
2021-02-06 12:18:55 +01:00
"sbruder.de"
];
users = import ./secrets/mail-users.nix;
rejectSenders = import ./secrets/mail-reject-senders.nix;
};
};
networking.hostName = "vueko";
system.stateVersion = "20.09";
2021-02-06 12:18:55 +01:00
2021-02-10 14:22:00 +01:00
# sadly, too many (legitimate) mail servers have broken dnssec on reverse
# lookups
services.resolved.dnssec = "false";
2021-02-06 12:18:55 +01:00
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
2021-02-06 12:18:55 +01:00
virtualHosts = {
"vueko.sbruder.de" = {
enableACME = true;
forceSSL = true;
2021-02-14 19:49:05 +01:00
default = true;
2021-02-14 19:49:05 +01:00
root = pkgs.sbruder.imprint;
2021-02-06 12:18:55 +01:00
};
"dav.sbruder.de" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://localhost:5232";
};
};
};
networking.firewall.allowedTCPPorts = [
80 # HTTP
443 # HTTPS
];
services.radicale = {
enable = true;
settings = {
2021-02-06 12:18:55 +01:00
auth = {
type = "htpasswd";
htpasswd_encryption = "bcrypt";
htpasswd_filename = toString (pkgs.writeText
"radicale-htpasswd"
(lib.concatMapStringsSep
"\n"
({ address, passwordHash, ... }: "${address}:${passwordHash}")
config.sbruder.mailserver.users));
};
};
};
}