25 lines
762 B
Nix
25 lines
762 B
Nix
{ config, lib, pkgs, ... }:
|
|
{
|
|
config = lib.mkIf config.services.mastodon.enable {
|
|
services.mastodon = {
|
|
localDomain = "social.${config.vars.primeDomain}";
|
|
streamingProcesses = 4;
|
|
configureNginx = true;
|
|
|
|
# Set up email security
|
|
smtp = {
|
|
createLocally = false;
|
|
host = "mx.${config.vars.mailDomain}";
|
|
port = 587;
|
|
authenticate = true;
|
|
fromAddress = "NixFox Mastodon <noreply@${config.vars.primeDomain}>";
|
|
user = "noreply@${config.vars.primeDomain}";
|
|
passwordFile = pkgs.writeText "smtp_pass.txt" config.secrets.mailPass.nixfoxNoReply;
|
|
};
|
|
};
|
|
environment.persistence."/persist".directories = [
|
|
"/var/lib/mastodon"
|
|
"/var/lib/postgresql"
|
|
];
|
|
};
|
|
}
|