diff --git a/flake.lock b/flake.lock index 9bc05e52..a5950df9 100644 --- a/flake.lock +++ b/flake.lock @@ -958,11 +958,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1699782692, - "narHash": "sha256-oB8PrzbdOj2BLMkbVtV1UgSnyVedeRY57tZAsGUPFSM=", + "lastModified": 1700405004, + "narHash": "sha256-yFZV4+g53ngIxvE8rJrSKreP2OmP3cvoUV12Z5oCGYM=", "owner": "CHN-beta", "repo": "nixpkgs", - "rev": "963d5addeb1fd398abba2ad704d724c78e145b57", + "rev": "36e1bf3ffcba3064dfee3620f0ad934218ec68f9", "type": "github" }, "original": { diff --git a/modules/services/mastodon.nix b/modules/services/mastodon.nix index 01c79ff4..36618fca 100644 --- a/modules/services/mastodon.nix +++ b/modules/services/mastodon.nix @@ -18,7 +18,7 @@ inputs: enableUnixSocket = false; localDomain = mastodon.hostname; database = - { + { createLocally = false; host = "127.0.0.1"; passwordFile = inputs.config.sops.secrets."mastodon/postgresql".path; @@ -34,7 +34,7 @@ inputs: fromAddress = "bot@chn.moe"; authenticate = true; }; - extraEnvFiles = [ inputs.config.sops.templates."mastodon/redis.env".path ]; + extraEnvFiles = [ inputs.config.sops.templates."mastodon/env".path ]; }; nixos.services = { @@ -65,8 +65,16 @@ inputs: "mastodon/mail" = { owner = "mastodon"; key = "mail/bot"; }; "mastodon/postgresql" = { owner = "mastodon"; key = "postgresql/mastodon"; }; }; - templates."mastodon/redis.env" = - { owner = "mastodon"; content = "REDIS_PASSWORD=${inputs.config.sops.placeholder."redis/mastodon"}"; }; + templates."mastodon/env" = + { + owner = "mastodon"; + content = + '' + REDIS_PASSWORD=${inputs.config.sops.placeholder."redis/mastodon"} + SMTP_SSL=true + SMTP_AUTH_METHOD=plain + ''; + }; }; }; }