Add mastodon

This commit is contained in:
Alexander Bantyev 2021-03-18 22:37:59 +03:00
parent e54fd18fbb
commit 9d1b643a82
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
5 changed files with 30 additions and 1 deletions

View File

@ -11,6 +11,7 @@
nginx
vsftpd
home-assistant
mastodon
];
services.logind.lidSwitch = "ignore";

View File

@ -33,6 +33,7 @@ builtins.listToAttrs (builtins.map (path: {
./servers/nginx.nix
./servers/vsftpd.nix
./servers/home-assistant.nix
./servers/mastodon.nix
./services.nix
./themes.nix
./virtualisation.nix

View File

@ -7,6 +7,10 @@ in {
owner = "dovecot2:dovecot2";
services = [ "dovecot2" ];
};
secrets.mailserver-mastodon = {
owner = "dovecot2:dovecot2";
services = [ "dovecot2" ];
};
services.postfix = {
dnsBlacklists = [
"all.s5h.net"
@ -79,6 +83,10 @@ in {
[ "balsoft" "admin@balsoft.ru" "patches" "patches@balsoft.ru" "issues" "issues@balsoft.ru" "admin" "root@balsoft.ru" "root" ];
hashedPasswordFile = config.secrets.mailserver.decrypted;
};
"mastodon@balsoft.ru" = {
aliases = [ "mastodon" ];
hashedPasswordFile = config.secrets.mailserver-mastodon.decrypted;
};
};
localDnsResolver = false;
certificateScheme = 1;

View File

@ -0,0 +1,19 @@
{ config, pkgs, lib, ... }: {
secrets.email-mastodon = {
owner = "mastodon:mastodon";
encrypted = "/home/balsoft/.password-store/email/mastodon@balsoft.ru.gpg";
services = [ "mastodon-web" ];
};
services.mastodon = {
enable = true;
configureNginx = true;
localDomain = "social.balsoft.ru";
smtp = {
createLocally = false;
fromAddress = "mastodon@balsoft.ru";
user = "mastodon";
host = "balsoft.ru";
passwordFile = config.secrets.email-mastodon.decrypted;
};
};
}

View File

@ -21,7 +21,7 @@
proxyPass = "http://localhost:13748";
};
enableACME = true;
addSSL = true;
forceSSL = true;
};
"code.balsoft.ru" = {
locations."/" = { proxyPass = "http://localhost:6000"; };