2023-10-02 22:48:18 +02:00
|
|
|
{ config, ... }:
|
2023-09-13 10:39:55 +02:00
|
|
|
|
2024-02-02 10:51:31 +01:00
|
|
|
let
|
|
|
|
host = "videos.dgnum.eu";
|
|
|
|
in
|
|
|
|
{
|
2023-09-13 10:39:55 +02:00
|
|
|
services.peertube = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
object_storage = {
|
|
|
|
enabled = true;
|
|
|
|
|
2023-10-05 23:28:27 +02:00
|
|
|
endpoint = "https://s3.dgnum.eu";
|
2023-09-13 10:39:55 +02:00
|
|
|
region = "garage";
|
|
|
|
|
2023-10-05 23:28:27 +02:00
|
|
|
max_upload_part = "150MB";
|
|
|
|
|
2023-09-13 10:39:55 +02:00
|
|
|
videos = {
|
|
|
|
bucket_name = "peertube-videos-dgnum";
|
2023-10-05 23:28:27 +02:00
|
|
|
prefix = "web-videos/";
|
|
|
|
base_url = "https://peertube-videos-dgnum.cdn.dgnum.eu";
|
2023-09-13 10:39:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
streaming_playlists = {
|
|
|
|
bucket_name = "peertube-videos-dgnum";
|
2023-10-05 23:28:27 +02:00
|
|
|
prefix = "streaming-playlists/";
|
|
|
|
base_url = "https://peertube-videos-dgnum.cdn.dgnum.eu";
|
2023-09-13 10:39:55 +02:00
|
|
|
};
|
|
|
|
};
|
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]";
|
|
|
|
|
2023-12-08 14:52:30 +01:00
|
|
|
webadmin.configuration.edition.allowed = true;
|
2023-09-24 23:11:54 +02:00
|
|
|
|
|
|
|
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;
|
2024-02-02 10:51:31 +01:00
|
|
|
serviceEnvironmentFile = config.age.secrets."peertube-service_environment_file".path;
|
2023-09-13 10:39:55 +02:00
|
|
|
secrets.secretsFile = config.age.secrets."peertube-secrets_file".path;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts.${host} = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
};
|
|
|
|
|
2024-02-19 14:47:27 +01:00
|
|
|
age-secrets.autoMatch = [ "peertube" ];
|
2023-09-13 10:39:55 +02:00
|
|
|
}
|