Configure collabora host

This commit is contained in:
pazpi 2026-02-04 13:40:14 +01:00
parent 00c636a7c5
commit 58f883b09e
5 changed files with 47 additions and 38 deletions

View file

@ -86,6 +86,12 @@ in
host = p.hosts.nextcloud; host = p.hosts.nextcloud;
}; };
collabora-online.proxy = {
enable = true;
domain = p.domains.public;
host = p.hosts.collabora;
};
paperless.proxy = { paperless.proxy = {
enable = true; enable = true;
domain = p.domains.public; domain = p.domains.public;

View file

@ -0,0 +1,30 @@
{
config,
pkgs,
lib,
...
}:
let
p = import ../parameters.nix;
in
{
my = {
utils = {
commons.enable = true;
lxc-standard.enable = true;
};
services.collabora-online = {
enable = true;
};
virtualisation.proxmox.enable = true;
};
# Extra packages
environment.systemPackages = with pkgs; [ ];
system.stateVersion = "24.11";
}

View file

@ -204,6 +204,15 @@
]; ];
}; };
collabora = {
module = ./collabora;
tags = [
"lxc"
"bacco"
"collabora"
];
};
# Special hosts (non-LXC or local deployment) # Special hosts (non-LXC or local deployment)
# deadbeef = { # deadbeef = {
# module = ./deadbeef; # module = ./deadbeef;

View file

@ -33,6 +33,7 @@ in
n8n = "n8n.${private-domain}"; n8n = "n8n.${private-domain}";
ilpost-podcast = "ilpost-podcast.${private-domain}"; ilpost-podcast = "ilpost-podcast.${private-domain}";
librenms = "librenms.${private-domain}"; librenms = "librenms.${private-domain}";
collabora = "collabora.${private-domain}";
}; };
email = "davide@${public-domain}"; email = "davide@${public-domain}";
} }

View file

@ -47,14 +47,6 @@ in
''; '';
}; };
officeSubdomain = lib.mkOption {
default = "office";
type = lib.types.str;
description = ''
The subdomain where Collabora Online is reachable
'';
};
host = lib.mkOption { host = lib.mkOption {
default = "localhost"; default = "localhost";
type = lib.types.str; type = lib.types.str;
@ -106,11 +98,6 @@ in
"OC\\Preview\\HEIC" "OC\\Preview\\HEIC"
"OC\\Preview\\Movie" "OC\\Preview\\Movie"
]; ];
memories = {
exiftool = "${lib.getExe pkgs.exiftool}";
vod.ffmpeg = "${lib.getExe pkgs.ffmpeg-headless}";
vod.ffprobe = "${pkgs.ffmpeg-headless}/bin/ffprobe";
};
}; };
phpOptions = { phpOptions = {
@ -143,7 +130,7 @@ in
contacts contacts
calendar calendar
cookbook cookbook
cospend # cospend
tasks tasks
richdocuments richdocuments
; ;
@ -151,27 +138,10 @@ in
}; };
collabora-online = {
enable = true;
settings = {
host = [
''127\.0\.0\.1''
];
storage.wopi."@allow" = true;
};
# hostname = "office.${cfg.proxy.domain}";
};
}; };
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
80 80
config.services.collabora-online.port
];
environment.systemPackages = with pkgs; [
exiftool
ffmpeg
]; ];
systemd.services."nextcloud-setup" = { systemd.services."nextcloud-setup" = {
@ -187,13 +157,6 @@ in
reverse_proxy http://${host}:80 reverse_proxy http://${host}:80
import cloudflare_${domain} import cloudflare_${domain}
''; '';
virtualHosts."${officeSubdomain}.${domain}".extraConfig = ''
import cloudflare_${domain}
reverse_proxy http://${host}:${toString config.services.collabora-online.port} {
# Required to circumvent bug of Onlyoffice loading mixed non-https content
header_up X-Forwarded-Proto https
}
'';
}; };
}) })
]; ];