dovwiefiwuef'

This commit is contained in:
2025-09-26 16:37:55 +03:00
parent 271f3289e5
commit 536f11bbfd
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,5 @@
{ {
# TODO: check whether there is no TODOs # TODO: check whether there is no TODOs
# TODO: check whether there is no hedgegdoc mentions
description = "Mastodon module"; description = "Mastodon module";
outputs = { ... }: outputs = { ... }:

View File

@@ -114,7 +114,7 @@ in
}; };
}; };
selfprivacy.emails."noreply.mastodon" = { selfprivacy.emails."noreplymastodon" = {
hashedPasswordFile = secrets.hashedPasswordFile; hashedPasswordFile = secrets.hashedPasswordFile;
systemdTargets = [ "mastodon-email-password-setup.service" ]; systemdTargets = [ "mastodon-email-password-setup.service" ];
sendOnly = true; sendOnly = true;
@@ -125,6 +125,7 @@ in
enable = true; enable = true;
wantedBy = [ "multi-user.target" "mastodon-web.service" "postfix.service" ]; wantedBy = [ "multi-user.target" "mastodon-web.service" "postfix.service" ];
serviceConfig = { serviceConfig = {
Slice = "mastodon.slice";
Type = "oneshot"; Type = "oneshot";
ExecStart = pkgs.writeShellScript "gen-mastodon-email-password" '' ExecStart = pkgs.writeShellScript "gen-mastodon-email-password" ''
export password=$(head -c 32 /dev/urandom | base64 | sed 's/[+=\\/A-Z]//g') export password=$(head -c 32 /dev/urandom | base64 | sed 's/[+=\\/A-Z]//g')
@@ -184,7 +185,7 @@ in
services.mastodon-web = { services.mastodon-web = {
unitConfig.RequiresMountsFor = lib.mkIf sp.useBinds "/volumes/${cfg.location}/mastodon"; unitConfig.RequiresMountsFor = lib.mkIf sp.useBinds "/volumes/${cfg.location}/mastodon";
serviceConfig = { serviceConfig = {
Slice = "hedgedoc.slice"; Slice = "mastodon.slice";
LoadCredential = ["client-secret:${oauthClientSecretFP}"]; LoadCredential = ["client-secret:${oauthClientSecretFP}"];
ExecStart = lib.mkForce (pkgs.writeShellScript "run-mastodon-with-client-secret" '' ExecStart = lib.mkForce (pkgs.writeShellScript "run-mastodon-with-client-secret" ''
export OIDC_CLIENT_SECRET=$(cat $CREDENTIALS_DIRECTORY/client-secret) export OIDC_CLIENT_SECRET=$(cat $CREDENTIALS_DIRECTORY/client-secret)