fix mastodon

This commit is contained in:
陈浩南 2023-11-19 22:44:06 +08:00
parent e7708c5647
commit d0ff526f82
2 changed files with 15 additions and 7 deletions

View File

@ -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": {

View File

@ -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
'';
};
};
};
}