From 596b60652a6bf5feb725dc96bc8e87690ae6de94 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Sat, 30 Dec 2023 15:02:18 +0000 Subject: [PATCH] add mastodon --- flake.nix | 1 + modules/mastodon.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 modules/mastodon.nix diff --git a/flake.nix b/flake.nix index a89ff2a..c20f4e5 100644 --- a/flake.nix +++ b/flake.nix @@ -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 diff --git a/modules/mastodon.nix b/modules/mastodon.nix new file mode 100644 index 0000000..7035e14 --- /dev/null +++ b/modules/mastodon.nix @@ -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"; + }; +}