aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/tools/peertube/default.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-12 00:24:23 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-20 04:12:27 +0100
commitab8f306d7c2c49b8116e1af7b355ed2384617ed9 (patch)
treed1061ec0436fd096de2332a892eb984c63cb125e /modules/private/websites/tools/peertube/default.nix
parent4227853a03923e04daf3dd511a4b5a1ab5d527e7 (diff)
downloadNix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.gz
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.zst
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.zip
Add specification for the private config file as a module.
Diffstat (limited to 'modules/private/websites/tools/peertube/default.nix')
-rw-r--r--modules/private/websites/tools/peertube/default.nix16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/private/websites/tools/peertube/default.nix b/modules/private/websites/tools/peertube/default.nix
index 6739641..0bacfd1 100644
--- a/modules/private/websites/tools/peertube/default.nix
+++ b/modules/private/websites/tools/peertube/default.nix
@@ -1,6 +1,6 @@
1{ lib, pkgs, config, myconfig, ... }: 1{ lib, pkgs, config, ... }:
2let 2let
3 env = myconfig.env.tools.peertube; 3 env = config.myEnv.tools.peertube;
4 cfg = config.myServices.websites.tools.peertube; 4 cfg = config.myServices.websites.tools.peertube;
5 pcfg = config.services.peertube; 5 pcfg = config.services.peertube;
6in { 6in {
@@ -27,7 +27,7 @@ in {
27 text = '' 27 text = ''
28 listen: 28 listen:
29 hostname: 'localhost' 29 hostname: 'localhost'
30 port: ${env.listenPort} 30 port: ${toString config.myEnv.ports.peertube}
31 webserver: 31 webserver:
32 https: true 32 https: true
33 hostname: 'peertube.immae.eu' 33 hostname: 'peertube.immae.eu'
@@ -45,7 +45,7 @@ in {
45 redis: 45 redis:
46 socket: '${env.redis.socket}' 46 socket: '${env.redis.socket}'
47 auth: null 47 auth: null
48 db: ${env.redis.db_index} 48 db: ${env.redis.db}
49 ldap: 49 ldap:
50 enable: true 50 enable: true
51 ldap_only: false 51 ldap_only: false
@@ -171,13 +171,13 @@ in {
171 171
172 RewriteCond %{REQUEST_URI} ^/socket.io [NC] 172 RewriteCond %{REQUEST_URI} ^/socket.io [NC]
173 RewriteCond %{QUERY_STRING} transport=websocket [NC] 173 RewriteCond %{QUERY_STRING} transport=websocket [NC]
174 RewriteRule /(.*) ws://localhost:${env.listenPort}/$1 [P,NE,QSA,L] 174 RewriteRule /(.*) ws://localhost:${toString env.listenPort}/$1 [P,NE,QSA,L]
175 175
176 RewriteCond %{REQUEST_URI} ^/tracker/socket [NC] 176 RewriteCond %{REQUEST_URI} ^/tracker/socket [NC]
177 RewriteRule /(.*) ws://localhost:${env.listenPort}/$1 [P,NE,QSA,L] 177 RewriteRule /(.*) ws://localhost:${toString env.listenPort}/$1 [P,NE,QSA,L]
178 178
179 ProxyPass / http://localhost:${env.listenPort}/ 179 ProxyPass / http://localhost:${toString env.listenPort}/
180 ProxyPassReverse / http://localhost:${env.listenPort}/ 180 ProxyPassReverse / http://localhost:${toString env.listenPort}/
181 181
182 ProxyPreserveHost On 182 ProxyPreserveHost On
183 RequestHeader set X-Real-IP %{REMOTE_ADDR}s 183 RequestHeader set X-Real-IP %{REMOTE_ADDR}s