add mastodon

This commit is contained in:
Grimmauld 2023-12-30 15:02:18 +00:00
parent bea40ce69b
commit 596b60652a
2 changed files with 18 additions and 0 deletions

View file

@ -34,6 +34,7 @@
./modules/letsencrypt.nix
./modules/fail2ban.nix
./modules/email.nix
./modules/mastodon.nix
agenix.nixosModules.default
nixos-mailserver.nixosModules.default
nixos-matrix-modules.nixosModules.default

17
modules/mastodon.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, ... } :
let
root_host = "grimmauld.de";
mastodon_host = "mastodon.${root_host}";
in {
security.acme.certs."${root_host}".extraDomainNames = [ mastodon_host ];
services.mastodon = {
enable = true;
localDomain = mastodon_host;
streamingProcesses = 7;
configureNginx = true;
smtp = {
fromAddress = "noreply@${root_host}";
};
extraConfig.SINGLE_USER_MODE = "true";
};
}