Skip to content

Commit

Permalink
Reapply "richdocuments and collabora"
Browse files Browse the repository at this point in the history
This reverts commit 7eca2e4.
  • Loading branch information
britter committed Sep 18, 2024
1 parent 2d21f4c commit 2c3c638
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/homelab.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ All of this configuration should be part of the backups, so it's only required t

### NextCloud

#### General

1. Configured users
2. Configured the bookmarks app for internet access so it can fetch previews.

#### Bookmarks app

1. Configured the bookmarks app for internet access so it can fetch previews.

#### Richdocuments app

1. Configure URL of Collabora Online Server to point to the server
2. Configure Allow list to only allow 172.17.0.2 (IP of the collabora docker container)

4 changes: 4 additions & 0 deletions modules/nixos/adguard/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ in {
domain = "adguard.ritter.family";
answer = config.my.homelab.directions.ip;
}
{
domain = "collabora.ritter.family";
answer = config.my.homelab.directions.ip;
}
{
domain = "fritz-box.ritter.family";
answer = config.my.homelab.directions.ip;
Expand Down
1 change: 1 addition & 0 deletions modules/nixos/nextcloud/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
in {
imports = [
./memories.nix
./richdocuments.nix
];

options.my.modules.nextcloud = {
Expand Down
44 changes: 44 additions & 0 deletions modules/nixos/nextcloud/richdocuments.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
config,
lib,
...
}: {
config = lib.mkIf config.services.nextcloud.enable {
# See https://collabora-online-for-nextcloud.readthedocs.io/en/latest/install/
services.nextcloud = {
extraApps = {
inherit (config.services.nextcloud.package.packages.apps) richdocuments;
};
};

virtualisation.oci-containers = lib.mkIf config.services.nextcloud.enable {
backend = "docker";
containers = {
collabora-code = {
image = "collabora/code:24.04.7.2.1";
ports = ["9980:9980"];
environment = {
extra_params = "--o:ssl.enable=false --o:ssl.termination=true";
};
extraOptions = ["--cap-add=MKNOD"];
};
};
};

systemd.services.nginx = {
after = ["docker-collabora-code.service"];
requires = ["docker-collabora-code.service"];
};

my.modules.https-proxy = {
enable = true;
configurations = [
{
fqdn = "collabora.${config.my.host.name}.ritter.family";
target = "http://localhost:9980";
proxyWebsockets = true;
}
];
};
};
}
5 changes: 5 additions & 0 deletions systems/aarch64-linux/directions/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
https-proxy = {
enable = true;
configurations = [
{
fqdn = "collabora.ritter.family";
target = "https://collabora.srv-prod-2.ritter.family";
proxyWebsockets = true;
}
{
fqdn = "fritz-box.ritter.family";
target = "https://${config.my.homelab.fritz-box.ip}";
Expand Down

0 comments on commit 2c3c638

Please sign in to comment.