mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Setup Mastodon
This commit is contained in:
parent
41519afebe
commit
dc7cff3140
8 changed files with 96 additions and 3 deletions
50
modules/mastodon.nix
Normal file
50
modules/mastodon.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.services.mastodon;
|
||||
in
|
||||
{
|
||||
options.custom.services.mastodon = {
|
||||
enable = mkEnableOption "mastodon";
|
||||
};
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
sops.secrets = {
|
||||
mastodonDbPassword = {
|
||||
owner = config.users.users.mastodon.name;
|
||||
key = "mastodon/db_password";
|
||||
restartUnits = [ "mastodon-init-db.service" ];
|
||||
};
|
||||
noreplyFroidmontPassword = {
|
||||
owner = config.users.users.mastodon.name;
|
||||
key = "email/accounts_passwords/noreply_froidmont_clear";
|
||||
};
|
||||
};
|
||||
|
||||
services.mastodon = {
|
||||
enable = true;
|
||||
localDomain = "social.froidmont.org";
|
||||
configureNginx = true;
|
||||
database = {
|
||||
createLocally = false;
|
||||
host = "10.0.1.11";
|
||||
name = "mastodon";
|
||||
user = "mastodon";
|
||||
passwordFile = config.sops.secrets.mastodonDbPassword.path;
|
||||
};
|
||||
smtp = {
|
||||
createLocally = false;
|
||||
authenticate = true;
|
||||
host = "mail.banditlair.com";
|
||||
port = 465;
|
||||
fromAddress = "noreply@froidmont.org";
|
||||
user = "noreply@froidmont.org";
|
||||
passwordFile = config.sops.secrets.noreplyFroidmontPassword.path;
|
||||
};
|
||||
extraConfig = {
|
||||
SMTP_SSL = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue