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;
|
2022-11-27 19:22:21 +00:00
|
|
|
endpoint = "s3.us-west-000.backblazeb2.com";
|
2022-11-27 09:43:23 +00:00
|
|
|
videos = {
|
|
|
|
bucket_name = "mastodon-chir-rs";
|
|
|
|
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 = {
|
|
|
|
bucket_name = "mastodon-chir-rs";
|
|
|
|
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;
|
|
|
|
};
|
2022-11-28 10:09:25 +00:00
|
|
|
systemd.services.peertube.path = with pkgs; lib.mkForce [bashInteractive ffmpeg_5 nodejs-16_x openssl yarn python3 coreutils systemd];
|
2022-11-27 09:43:23 +00:00
|
|
|
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
|
|
|
}
|