expose nextcloud and collabora on proxy
This commit is contained in:
parent
d0793fb125
commit
f9874296ae
1 changed files with 25 additions and 1 deletions
|
|
@ -2,9 +2,15 @@
|
|||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
utils = import ../../utils.nix { inherit inputs lib; };
|
||||
inherit (utils) mkNginxVHosts;
|
||||
in
|
||||
|
||||
{
|
||||
services = {
|
||||
nextcloud = {
|
||||
|
|
@ -62,17 +68,35 @@
|
|||
|
||||
collabora-online = {
|
||||
enable = true;
|
||||
port = 9980;
|
||||
settings = {
|
||||
ssl = {
|
||||
enable = false;
|
||||
termination = true;
|
||||
};
|
||||
net = {
|
||||
listen = "unix";
|
||||
listen = "loopback";
|
||||
frame_ancestors = "cloud.baduhai.dev";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nginx.virtualHosts = mkNginxVHosts {
|
||||
acmeHost = "baduhai.dev";
|
||||
domains = {
|
||||
"cloud.baduhai.dev" = { };
|
||||
"office.baduhai.dev".locations = {
|
||||
"/".proxyPass = "http://127.0.0.1:${toString config.services.collabora-online.port}";
|
||||
"~ ^/cool/(.*)/ws$".proxyPass = "http://127.0.0.1:${toString config.services.collabora-online.port}";
|
||||
"~ ^/cool/(.*)/ws$".extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_read_timeout 36000s;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue