2022-11-28 10:09:25 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
2022-11-27 09:43:23 +00:00
|
|
|
services.peertube = {
|
|
|
|
enable = true;
|
|
|
|
localDomain = "peertube.chir.rs";
|
|
|
|
listenHttp = 5370;
|
2022-11-27 13:43:41 +00:00
|
|
|
listenWeb = 443;
|
|
|
|
enableWebHttps = true;
|
2022-12-20 08:18:36 +00:00
|
|
|
serviceEnvironmentFile = config.sops.secrets."services/peertube/env".path;
|
|
|
|
secrets.secretsFile = config.sops.secrets."services/peertube/secret".path;
|
2022-11-27 09:43:23 +00:00
|
|
|
settings = {
|
|
|
|
object_storage = {
|
2023-05-21 17:32:58 +00:00
|
|
|
upload_acl.public = "private";
|
2022-11-27 09:43:23 +00:00
|
|
|
enabled = true;
|
2023-10-01 14:47:26 +00:00
|
|
|
endpoint = "ams1.vultrobjects.com";
|
2022-11-27 09:43:23 +00:00
|
|
|
videos = {
|
2023-10-01 14:47:26 +00:00
|
|
|
bucket_name = "mastodon-assets-chir-rs";
|
2022-11-27 09:43:23 +00:00
|
|
|
prefix = "peertube/videos/";
|
2023-02-11 20:53:27 +00:00
|
|
|
base_url = "https://mastodon-assets.chir.rs";
|
2022-11-27 09:43:23 +00:00
|
|
|
};
|
|
|
|
streaming_playlists = {
|
2023-10-01 14:47:26 +00:00
|
|
|
bucket_name = "mastodon-assets-chir-rs";
|
2022-11-27 09:43:23 +00:00
|
|
|
prefix = "peertube/streaming-playlists/";
|
2023-02-11 20:53:27 +00:00
|
|
|
base_url = "https://mastodon-assets.chir.rs";
|
2022-11-27 09:43:23 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
database.createLocally = true;
|
|
|
|
redis.createLocally = true;
|
|
|
|
};
|
|
|
|
services.caddy.virtualHosts."peertube.chir.rs" = {
|
|
|
|
useACMEHost = "chir.rs";
|
2022-12-30 13:03:57 +00:00
|
|
|
logFormat = pkgs.lib.mkForce "";
|
2022-11-27 09:43:23 +00:00
|
|
|
extraConfig = ''
|
|
|
|
import baseConfig
|
|
|
|
reverse_proxy {
|
|
|
|
to http://127.0.0.1:5370
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
2022-12-20 08:18:36 +00:00
|
|
|
sops.secrets."services/peertube/env".owner = "peertube";
|
|
|
|
sops.secrets."services/peertube/secret".owner = "peertube";
|
2022-11-27 09:43:23 +00:00
|
|
|
}
|