NixOS-Config/modules/system/services/server/social/pixelfed/default.nix

33 lines
1 KiB
Nix

{ pkgs, config, ... }:
{
services.pixelfed = {
enable = true;
domain = "pics.${config.secrets.jimDomain}";
secretFile = pkgs.writeText "appkey" config.secrets.pixelfedKey;
settings = {
APP_NAME = ''"Jimbo's Pixelfed"'';
INSTANCE_DESCRIPTION = ''"The Jimbosfiles Pixelfed Instance"'';
INSTANCE_CONTACT_EMAIL = "jimbo@${config.secrets.jimDomain}";
OPEN_REGISTRATION = true;
APP_LOCALE = "en";
INSTANCE_DISCOVER_PUBLIC = false;
STORIES_ENABLED = true;
# Mail config
ENFORCE_EMAIL_VERIFICATION = true;
MAIL_FROM_ADDRESS = "noreply@${config.secrets.jimDomain}";
MAIL_FROM_NAME = ''"Jimbo's Pixelfed <noreply@${config.secrets.jimDomain}>"'';
MAIL_ENCRYPTION = "tls";
MAIL_DRIVER = "smtp";
MAIL_HOST = "mx.${config.secrets.jimDomain}";
MAIL_PORT = 587;
MAIL_USERNAME = "noreply@${config.secrets.jimDomain}";
MAIL_PASSWORD = "${config.secrets.noreplyPassword}";
};
nginx = {
enableACME = true;
forceSSL = true;
};
};
}