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,
|
lib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
utils = import ../../utils.nix { inherit inputs lib; };
|
||||||
|
inherit (utils) mkNginxVHosts;
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
nextcloud = {
|
nextcloud = {
|
||||||
|
|
@ -62,17 +68,35 @@
|
||||||
|
|
||||||
collabora-online = {
|
collabora-online = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
port = 9980;
|
||||||
settings = {
|
settings = {
|
||||||
ssl = {
|
ssl = {
|
||||||
enable = false;
|
enable = false;
|
||||||
termination = true;
|
termination = true;
|
||||||
};
|
};
|
||||||
net = {
|
net = {
|
||||||
listen = "unix";
|
listen = "loopback";
|
||||||
frame_ancestors = "cloud.baduhai.dev";
|
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 = {
|
age.secrets = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue