This commit is contained in:
2025-09-12 15:26:28 +03:00
parent 68fd025c02
commit c34269a83e

View File

@@ -9,7 +9,7 @@ let
cfg = sp.modules.mastodon; cfg = sp.modules.mastodon;
oauthClientID = "mastodon"; oauthClientID = "mastodon";
auth-passthru = config.selfprivacy.passthru.auth; auth-passthru = config.selfprivacy.passthru.auth;
oauthDiscoveryURL = config.services.kanidm.serverSettings.origin; oauthDiscoveryURL = auth-passthru.oauth2-discovery-url oauthClientID;
issuer = lib.strings.removeSuffix "/.well-known/openid-configuration" oauthDiscoveryURL; issuer = lib.strings.removeSuffix "/.well-known/openid-configuration" oauthDiscoveryURL;
usersGroup = "sp.mastodon.users"; usersGroup = "sp.mastodon.users";
@@ -61,13 +61,6 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
assertions = [
{
assertion = sp.sso.enable;
message = "Mastodon cannot be enabled when SSO is disabled.";
}
];
fileSystems = lib.mkIf sp.useBinds { fileSystems = lib.mkIf sp.useBinds {
"/var/lib/mastodon" = { "/var/lib/mastodon" = {
device = "/volumes/${cfg.location}/mastodon"; device = "/volumes/${cfg.location}/mastodon";
@@ -102,10 +95,10 @@ in
}; };
}; };
mailserver.loginAccounts."noreply.mastodon@${sp.domain}" = { # mailserver.loginAccounts."noreply.mastodon@${sp.domain}" = {
hashedPassword = "/run/keys/mastodon/email_password"; # hashedPasswordFile = "/run/keys/mastodon/email_password";
sendOnly = true; # sendOnly = true;
}; # };
services.postfix.config.virtual_mailbox_maps = [ "hash:/run/postfix/mastodon.cf" ]; services.postfix.config.virtual_mailbox_maps = [ "hash:/run/postfix/mastodon.cf" ];