aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-09 17:54:17 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-09 17:59:32 +0200
commitb639cc33725fed62988b616909843bea7f7aebe3 (patch)
tree8735eb30b8cea59c44cb839299eda061e5714b04 /modules
parent01c4c5a4f6314cbebf65ce68bc941efb0e4c6aa5 (diff)
downloadNix-b639cc33725fed62988b616909843bea7f7aebe3.tar.gz
Nix-b639cc33725fed62988b616909843bea7f7aebe3.tar.zst
Nix-b639cc33725fed62988b616909843bea7f7aebe3.zip
Upgrade peertube to latest version
Diffstat (limited to 'modules')
-rw-r--r--modules/private/websites/tools/peertube/default.nix108
-rw-r--r--modules/private/websites/tools/tools/default.nix1
2 files changed, 96 insertions, 13 deletions
diff --git a/modules/private/websites/tools/peertube/default.nix b/modules/private/websites/tools/peertube/default.nix
index 0bacfd1..445030c 100644
--- a/modules/private/websites/tools/peertube/default.nix
+++ b/modules/private/websites/tools/peertube/default.nix
@@ -15,7 +15,7 @@ in {
15 services.peertube = { 15 services.peertube = {
16 enable = true; 16 enable = true;
17 configFile = "/var/secrets/webapps/tools-peertube"; 17 configFile = "/var/secrets/webapps/tools-peertube";
18 package = pkgs.webapps.peertube.override { ldap = true; }; 18 package = pkgs.webapps.peertube.override { ldap = true; sendmail = true; light = "fr-FR"; };
19 }; 19 };
20 users.users.peertube.extraGroups = [ "keys" ]; 20 users.users.peertube.extraGroups = [ "keys" ];
21 21
@@ -32,6 +32,23 @@ in {
32 https: true 32 https: true
33 hostname: 'peertube.immae.eu' 33 hostname: 'peertube.immae.eu'
34 port: 443 34 port: 443
35 rates_limit:
36 api:
37 # 50 attempts in 10 seconds
38 window: 10 seconds
39 max: 50
40 login:
41 # 15 attempts in 5 min
42 window: 5 minutes
43 max: 15
44 signup:
45 # 2 attempts in 5 min (only succeeded attempts are taken into account)
46 window: 5 minutes
47 max: 2
48 ask_send_email:
49 # 3 attempts in 5 min
50 window: 5 minutes
51 max: 3
35 trust_proxy: 52 trust_proxy:
36 - 'loopback' 53 - 'loopback'
37 database: 54 database:
@@ -46,15 +63,18 @@ in {
46 socket: '${env.redis.socket}' 63 socket: '${env.redis.socket}'
47 auth: null 64 auth: null
48 db: ${env.redis.db} 65 db: ${env.redis.db}
49 ldap: 66 auth:
50 enable: true 67 local:
51 ldap_only: false 68 enabled: true
52 url: ldaps://${env.ldap.host}/${env.ldap.base} 69 ldap:
53 bind_dn: ${env.ldap.dn} 70 enabled: true
54 bind_password: ${env.ldap.password} 71 ldap_only: false
55 base: ${env.ldap.base} 72 url: ldaps://${env.ldap.host}/${env.ldap.base}
56 mail_entry: "mail" 73 bind_dn: ${env.ldap.dn}
57 user_filter: "${env.ldap.filter}" 74 bind_password: ${env.ldap.password}
75 base: ${env.ldap.base}
76 mail_entry: "mail"
77 user_filter: "${env.ldap.filter}"
58 smtp: 78 smtp:
59 transport: sendmail 79 transport: sendmail
60 sendmail: '/run/wrappers/bin/sendmail' 80 sendmail: '/run/wrappers/bin/sendmail'
@@ -66,10 +86,16 @@ in {
66 disable_starttls: false 86 disable_starttls: false
67 ca_file: null # Used for self signed certificates 87 ca_file: null # Used for self signed certificates
68 from_address: 'peertube@tools.immae.eu' 88 from_address: 'peertube@tools.immae.eu'
89 email:
90 body:
91 signature: "PeerTube"
92 subject:
93 prefix: "[PeerTube]"
69 storage: 94 storage:
70 tmp: '${pcfg.dataDir}/storage/tmp/' 95 tmp: '${pcfg.dataDir}/storage/tmp/'
71 avatars: '${pcfg.dataDir}/storage/avatars/' 96 avatars: '${pcfg.dataDir}/storage/avatars/'
72 videos: '${pcfg.dataDir}/storage/videos/' 97 videos: '${pcfg.dataDir}/storage/videos/'
98 streaming_playlists: '${pcfg.dataDir}/storage/streaming-playlists/'
73 redundancy: '${pcfg.dataDir}/storage/videos/' 99 redundancy: '${pcfg.dataDir}/storage/videos/'
74 logs: '${pcfg.dataDir}/storage/logs/' 100 logs: '${pcfg.dataDir}/storage/logs/'
75 previews: '${pcfg.dataDir}/storage/previews/' 101 previews: '${pcfg.dataDir}/storage/previews/'
@@ -77,8 +103,14 @@ in {
77 torrents: '${pcfg.dataDir}/storage/torrents/' 103 torrents: '${pcfg.dataDir}/storage/torrents/'
78 captions: '${pcfg.dataDir}/storage/captions/' 104 captions: '${pcfg.dataDir}/storage/captions/'
79 cache: '${pcfg.dataDir}/storage/cache/' 105 cache: '${pcfg.dataDir}/storage/cache/'
106 plugins: '${pcfg.dataDir}/storage/plugins/'
80 log: 107 log:
81 level: 'info' 108 level: 'info'
109 rotation:
110 enabled : true # Enabled by default, if disabled make sure that 'storage.logs' is pointing to a folder handled by logrotate
111 maxFileSize: 12MB
112 maxFiles: 20
113 anonymizeIP: false
82 search: 114 search:
83 remote_uri: 115 remote_uri:
84 users: true 116 users: true
@@ -90,6 +122,26 @@ in {
90 videos: 122 videos:
91 check_interval: '1 hour' # How often you want to check new videos to cache 123 check_interval: '1 hour' # How often you want to check new videos to cache
92 strategies: # Just uncomment strategies you want 124 strategies: # Just uncomment strategies you want
125 csp:
126 enabled: false
127 report_only: true # CSP directives are still being tested, so disable the report only mode at your own risk!
128 report_uri:
129 tracker:
130 enabled: true
131 private: true
132 reject_too_many_announces: false
133 history:
134 videos:
135 max_age: -1
136 views:
137 videos:
138 remote:
139 max_age: -1
140 plugins:
141 index:
142 enabled: true
143 check_latest_versions_interval: '12 hours'
144 url: 'https://packages.joinpeertube.org'
93 # Following are saved in local-production.json 145 # Following are saved in local-production.json
94 cache: 146 cache:
95 previews: 147 previews:
@@ -114,13 +166,18 @@ in {
114 transcoding: 166 transcoding:
115 enabled: false 167 enabled: false
116 allow_additional_extensions: true 168 allow_additional_extensions: true
169 allow_audio_files: true
117 threads: 1 170 threads: 1
118 resolutions: 171 resolutions:
172 0p: false
119 240p: false 173 240p: false
120 360p: false 174 360p: false
121 480p: true 175 480p: true
122 720p: true 176 720p: true
123 1080p: true 177 1080p: true
178 2160p: false
179 webtorrent:
180 enabled: true
124 hls: 181 hls:
125 enabled: false 182 enabled: false
126 import: 183 import:
@@ -129,13 +186,27 @@ in {
129 enabled: true 186 enabled: true
130 torrent: 187 torrent:
131 enabled: false 188 enabled: false
189 auto_blacklist:
190 videos:
191 of_users:
192 enabled: false
132 instance: 193 instance:
133 name: 'Immae&#x2019;s PeerTube' 194 name: 'Immae&#x2019;s PeerTube'
134 short_description: 'PeerTube, a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.' 195 short_description: 'PeerTube, a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.'
135 description: ''' 196 description: '''
136 terms: ''' 197 terms: '''
198 code_of_conduct: '''
199 moderation_information: '''
200 creation_reason: '''
201 administrator: '''
202 maintenance_lifetime: '''
203 business_model: '''
204 hardware_information: '''
205 languages:
206 categories:
137 default_client_route: '/videos/trending' 207 default_client_route: '/videos/trending'
138 default_nsfw_policy: 'blur' 208 is_nsfw: false
209 default_nsfw_policy: 'do_not_list'
139 customizations: 210 customizations:
140 javascript: ''' 211 javascript: '''
141 css: ''' 212 css: '''
@@ -145,11 +216,22 @@ in {
145 securitytxt: 216 securitytxt:
146 "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:" 217 "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:"
147 services: 218 services:
148 # You can provide a reporting endpoint for Content Security Policy violations
149 csp-logger:
150 twitter: 219 twitter:
151 username: '@_immae' 220 username: '@_immae'
152 whitelisted: false 221 whitelisted: false
222 followers:
223 instance:
224 enabled: true
225 manual_approval: false
226 followings:
227 instance:
228 auto_follow_back:
229 enabled: false
230 auto_follow_index:
231 enabled: false
232 index_url: 'https://instances.joinpeertube.org'
233 theme:
234 default: 'default'
153 ''; 235 '';
154 }]; 236 }];
155 237
diff --git a/modules/private/websites/tools/tools/default.nix b/modules/private/websites/tools/tools/default.nix
index 5e0d446..46a28e7 100644
--- a/modules/private/websites/tools/tools/default.nix
+++ b/modules/private/websites/tools/tools/default.nix
@@ -299,6 +299,7 @@ in {
299 user = "wwwrun"; 299 user = "wwwrun";
300 group = "wwwrun"; 300 group = "wwwrun";
301 settings = ldap.phpFpm.pool; 301 settings = ldap.phpFpm.pool;
302 phpPackage = pkgs.php74;
302 }; 303 };
303 kanboard = { 304 kanboard = {
304 user = "wwwrun"; 305 user = "wwwrun";