Matrix: Difference between revisions
m Add a script to start element-web |
No edit summary |
||
Line 39: | Line 39: | ||
services.nginx.virtualHosts."localhost" = { | services.nginx.virtualHosts."localhost" = { | ||
listen = [{ | listen = [{ | ||
addr = | addr = "::1"; | ||
# port = yourPort; | # port = yourPort; | ||
}]; | }]; | ||
Line 53: | Line 53: | ||
</syntaxhighlight>Alternatively, you can write a script to start the web client on demand.<syntaxhighlight lang="nix"> | </syntaxhighlight>Alternatively, you can write a script to start the web client on demand.<syntaxhighlight lang="nix"> | ||
let | let | ||
# port = yourPort; | # port = yourPort; | ||
web-dir = pkgs.element-web.override { | web-dir = pkgs.element-web.override { | ||
Line 64: | Line 63: | ||
#!${pkgs.bash}/bin/bash | #!${pkgs.bash}/bin/bash | ||
set -e | set -e | ||
${pkgs.python3}/bin/python3 -m http.server ${port} -b | ${pkgs.python3}/bin/python3 -m http.server ${port} -b ::1 -d ${web-dir} | ||
''; | ''; | ||
in | in | ||
Line 87: | Line 86: | ||
# server_name = yourDomainName; | # server_name = yourDomainName; | ||
# port = yourPort; | # port = yourPort; | ||
address = | address = "::1"; | ||
database_backend = "rocksdb"; | database_backend = "rocksdb"; | ||
# See https://www.metered.ca/tools/openrelay | # See https://www.metered.ca/tools/openrelay |