Fix Peertube service

This commit is contained in:
Nicolas Jeannerod 2024-12-17 17:14:27 +01:00
parent 79730bfd38
commit a5875376b8
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8
2 changed files with 26 additions and 4 deletions

View file

@ -11,6 +11,10 @@ lib.mkIf (config.fediversity.enable && config.fediversity.peertube.enable) {
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
80 80
443 443
## For Live streaming and Live streaming when RTMPS is enabled.
1935
1936
]; ];
services.garage = { services.garage = {
@ -70,6 +74,8 @@ lib.mkIf (config.fediversity.enable && config.fediversity.peertube.enable) {
enabled = true; enabled = true;
endpoint = config.fediversity.internal.garage.api.url; endpoint = config.fediversity.internal.garage.api.url;
region = "garage"; region = "garage";
upload_acl.public = null; # Garage does not support ACL
upload_acl.private = null; # Garage does not support ACL
# not supported by garage # not supported by garage
# SEE: https://garagehq.deuxfleurs.fr/documentation/connect/apps/#peertube # SEE: https://garagehq.deuxfleurs.fr/documentation/connect/apps/#peertube
@ -101,7 +107,11 @@ lib.mkIf (config.fediversity.enable && config.fediversity.peertube.enable) {
## Proxying through Nginx ## Proxying through Nginx
services.peertube.configureNginx = true; services.peertube = {
configureNginx = true;
listenWeb = 443;
enableWebHttps = true;
};
services.nginx.virtualHosts.${config.services.peertube.localDomain} = { services.nginx.virtualHosts.${config.services.peertube.localDomain} = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;

View file

@ -1,11 +1,23 @@
{ modulesPath, ... }: {
modulesPath,
pkgs,
...
}:
{ {
imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ]; imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ];
fediversity = {
enable = true;
domain = "localhost";
peertube.enable = true;
temp.peertubeSecretsFile = pkgs.writeText "secret" ''
574e093907d1157ac0f8e760a6deb1035402003af5763135bae9cbd6abe32b24
'';
};
services.peertube = { services.peertube = {
enableWebHttps = false;
settings = { settings = {
listen.hostname = "0.0.0.0"; listen.hostname = "0.0.0.0";
instance.name = "PeerTube Test VM"; instance.name = "PeerTube Test VM";