nix-infra/configs/services/mastodon.nix
2025-09-12 14:24:10 +02:00

36 lines
775 B
Nix

{ lib, pkgs, config, ... }:
{
security.acme = {
acceptTerms = true;
defaults.email = "fedi@cdaut.de";
};
# set up smtp pass
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets.smtp_pass = {
sopsFile = ../../secrets/mastodon/secrets.yaml;
};
};
services.mastodon = {
enable = true;
streamingProcesses = 1;
localDomain = "puppyplaypissparty.de";
configureNginx = true;
smtp = {
fromAddress = "fedi@cdaut.de";
host = "mail.cdaut.de";
user = "fedi@cdaut.de";
port = 587;
authenticate = true;
passwordFile = config.sops.secrets.smtp_pass.path;
};
database = {
createLocally = true;
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
}