nix-config/modules/nixos/services/nextcloud/collabora.nix
Bruno BELANYI 1b4111e28f
Some checks failed
ci/woodpecker/push/check Pipeline failed
nixos: services: nextcloud: use declarative apps
Now that the `notify_push` module declaratively installs _its_ app [1],
I should declaratively install _all_ apps.

[1]: https://github.com/NixOS/nixpkgs/pull/451501
2025-11-08 22:14:25 +01:00

56 lines
1.2 KiB
Nix

# Document editor with Nextcloud
{ config, lib, ... }:
let
cfg = config.my.services.nextcloud.collabora;
in
{
options.my.services.nextcloud.collabora = with lib; {
enable = mkEnableOption "Collabora integration";
port = mkOption {
type = types.port;
default = 9980;
example = 8080;
description = "Internal port for API";
};
};
config = lib.mkIf cfg.enable {
services.nextcloud = {
extraApps = {
inherit (config.services.nextcloud.package.packages.apps) richdocuments;
};
};
services.collabora-online = {
enable = true;
inherit (cfg) port;
aliasGroups = [
{
host = "https://collabora.${config.networking.domain}";
# Allow using from nextcloud
aliases = [ "https://${config.services.nextcloud.hostName}" ];
}
];
settings = {
# Rely on reverse proxy for SSL
ssl = {
enable = false;
termination = true;
};
};
};
my.services.nginx.virtualHosts = {
collabora = {
inherit (cfg) port;
websocketsLocations = [
"~ ^/cool/(.*)/ws$"
"^~ /cool/adminws"
];
};
};
};
}