diff options
Diffstat (limited to '')
-rw-r--r-- | modules/by-name/ma/mastodon/patches/0001-feat-treewide-Increase-character-limit-to-5000-in-me.patch (renamed from system/services/mastodon/patches/0001-feat-treewide-Increase-character-limit-to-5000-in-me.patch) | 0 | ||||
-rw-r--r-- | system/services/default.nix | 1 | ||||
-rw-r--r-- | system/services/mastodon/default.nix | 79 |
3 files changed, 0 insertions, 80 deletions
diff --git a/system/services/mastodon/patches/0001-feat-treewide-Increase-character-limit-to-5000-in-me.patch b/modules/by-name/ma/mastodon/patches/0001-feat-treewide-Increase-character-limit-to-5000-in-me.patch index 35dc809..35dc809 100644 --- a/system/services/mastodon/patches/0001-feat-treewide-Increase-character-limit-to-5000-in-me.patch +++ b/modules/by-name/ma/mastodon/patches/0001-feat-treewide-Increase-character-limit-to-5000-in-me.patch diff --git a/system/services/default.nix b/system/services/default.nix index dfce3be..967bad0 100644 --- a/system/services/default.nix +++ b/system/services/default.nix @@ -2,7 +2,6 @@ imports = [ ./invidious ./mail - ./mastodon ./matrix ./minecraft ./restic diff --git a/system/services/mastodon/default.nix b/system/services/mastodon/default.nix deleted file mode 100644 index 15b8609..0000000 --- a/system/services/mastodon/default.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ - config, - pkgs, - ... -}: let - emailAddress = "mastodon@vhack.eu"; - applyPatches = pkg: - pkg.overrideAttrs (attrs: { - patches = (attrs.patches or []) ++ [./patches/0001-feat-treewide-Increase-character-limit-to-5000-in-me.patch]; - }); -in { - vhack.persist.directories = [ - { - directory = "/var/lib/mastodon"; - user = "mastodon"; - group = "mastodon"; - mode = "0700"; - } - ]; - - services.mastodon = { - enable = true; - - package = applyPatches pkgs.mastodon; - - # Unstable Mastodon package, used if - # security updates aren't backported. - #package = applyPatches pkgs-unstable.mastodon; - - localDomain = "vhack.eu"; - smtp = { - authenticate = true; - createLocally = false; - fromAddress = emailAddress; - user = emailAddress; - host = "server1.vhack.eu"; - passwordFile = config.age.secrets.mastodonMail.path; - }; - streamingProcesses = 5; # Number of Cores - 1 - extraConfig = { - WEB_DOMAIN = "mastodon.vhack.eu"; - EMAIL_DOMAIN_ALLOWLIST = "vhack.eu|sils.li"; - }; - }; - - services.nginx = { - enable = true; - recommendedProxySettings = true; # required for redirections to work - virtualHosts = { - ${config.services.mastodon.extraConfig.WEB_DOMAIN} = { - root = "${config.services.mastodon.package}/public/"; - # mastodon only supports https, but you can override this if you offload tls elsewhere. - forceSSL = true; - enableACME = true; - - locations = { - "/system/".alias = "/var/lib/mastodon/public-system/"; - "/".tryFiles = "$uri @proxy"; - "@proxy" = { - proxyPass = "http://unix:/run/mastodon-web/web.socket"; - proxyWebsockets = true; - }; - "/api/v1/streaming/" = { - proxyPass = "http://unix:/run/mastodon-streaming/streaming.socket"; - proxyWebsockets = true; - }; - }; - }; - - "vhack.eu" = { - locations."/.well-known/webfinger".return = "301 https://${config.services.mastodon.extraConfig.WEB_DOMAIN}$request_uri"; - }; - }; - }; - - users.groups.${config.services.mastodon.group}.members = [ - config.services.nginx.user - ]; -} |