2023-10-02 22:48:18 +02:00
|
|
|
{ config, ... }:
|
2023-09-13 10:39:55 +02:00
|
|
|
|
2023-10-02 22:48:18 +02:00
|
|
|
let host = "videos.dgnum.eu";
|
2023-09-13 10:39:55 +02:00
|
|
|
in {
|
|
|
|
services.peertube = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
object_storage = {
|
|
|
|
enabled = true;
|
|
|
|
|
|
|
|
endpoint = "s3.dgnum.eu";
|
|
|
|
region = "garage";
|
|
|
|
|
|
|
|
videos = {
|
|
|
|
bucket_name = "peertube-videos-dgnum";
|
|
|
|
prefix = "web-videos";
|
|
|
|
};
|
|
|
|
|
|
|
|
streaming_playlists = {
|
|
|
|
bucket_name = "peertube-videos-dgnum";
|
|
|
|
prefix = "streaming-playlists";
|
|
|
|
};
|
|
|
|
};
|
2023-09-24 23:11:54 +02:00
|
|
|
|
|
|
|
smtp = {
|
|
|
|
transport = "smtp";
|
|
|
|
hostname = "kurisu.lahfa.xyz";
|
|
|
|
port = 465;
|
|
|
|
username = "web-services@infra.dgnum.eu";
|
|
|
|
tls = true;
|
|
|
|
disable_starttls = true;
|
|
|
|
from_address = "videos@infra.dgnum.eu";
|
|
|
|
};
|
|
|
|
|
|
|
|
email.subject.prefix = "[videos.dgnum]";
|
|
|
|
|
|
|
|
webadmin.configuration.edition.allowed = false;
|
|
|
|
|
|
|
|
user.video_quota = "10GB";
|
2023-09-13 10:39:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
localDomain = host;
|
|
|
|
configureNginx = true;
|
|
|
|
listenWeb = 443;
|
|
|
|
enableWebHttps = true;
|
|
|
|
|
|
|
|
redis.createLocally = true;
|
|
|
|
database.createLocally = true;
|
|
|
|
|
2023-09-24 23:11:54 +02:00
|
|
|
smtp.passwordFile = config.age.secrets."peertube-smtp_password_file".path;
|
2023-09-13 10:39:55 +02:00
|
|
|
serviceEnvironmentFile =
|
|
|
|
config.age.secrets."peertube-service_environment_file".path;
|
|
|
|
secrets.secretsFile = config.age.secrets."peertube-secrets_file".path;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts.${host} = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
};
|
|
|
|
|
2023-10-02 22:48:18 +02:00
|
|
|
dgn-secrets.matches."^peertube-.*$" = { owner = "peertube"; };
|
2023-09-13 10:39:55 +02:00
|
|
|
}
|