feat(nextcloud): Deploy collabora without docker
All checks were successful
Run pre-commit on all files / check (push) Successful in 24s
Check meta / check_dns (pull_request) Successful in 18s
Check meta / check_meta (pull_request) Successful in 19s
Check workflows / check_workflows (pull_request) Successful in 25s
Build all the nodes / ap01 (pull_request) Successful in 3m13s
Build all the nodes / bridge01 (pull_request) Successful in 4m57s
Build all the nodes / geo01 (pull_request) Successful in 4m41s
Build all the nodes / rescue01 (pull_request) Successful in 4m36s
Build all the nodes / geo02 (pull_request) Successful in 4m42s
Run pre-commit on all files / check (pull_request) Successful in 26s
Build all the nodes / vault01 (pull_request) Successful in 4m16s
Build all the nodes / web03 (pull_request) Successful in 4m40s
Build all the nodes / web02 (pull_request) Successful in 4m43s
Build all the nodes / web01 (pull_request) Successful in 5m19s
Build all the nodes / storage01 (pull_request) Successful in 1m47s
Build all the nodes / compute01 (pull_request) Successful in 7m51s

This commit is contained in:
Tom Hubrecht 2024-12-10 15:40:30 +01:00
parent 026acdecb7
commit c7c1042040
Signed by: thubrecht
SSH key fingerprint: SHA256:CYNvFo44Ar9qCNnWNnvJVhs0QXO9AZjOLlPeWcSij3Q
2 changed files with 164 additions and 157 deletions

View file

@ -1,4 +1,9 @@
{ config, pkgs, ... }:
{
config,
pkgs,
nixpkgs,
...
}:
let
host = "cloud.dgnum.eu";
@ -7,7 +12,9 @@ let
port = 9980;
in
{
services.nextcloud = {
services = {
nextcloud = {
enable = true;
hostName = host;
@ -87,43 +94,30 @@ in
};
};
virtualisation = {
podman = {
collabora-online = {
enable = true;
defaultNetwork.settings = {
dns_enable = true;
ipv6_enabled = true;
};
};
inherit port;
package = nixpkgs.nixos.unstable.collabora-online;
settings = {
server_name = "code.dgnum.eu";
ssl = {
enable = false;
termination = true;
};
virtualisation.oci-containers = {
containers.collabora = {
image = "collabora/code";
imageFile = pkgs.dockerTools.pullImage {
imageName = "collabora/code";
imageDigest = "sha256:07da8a191b37058514dfdf921ea8c2270c6634fa659acee774cf8594f86950e4";
sha256 = "sha256-5oaz07NQScHUVN/HznzZGQ2bGrU/V1GhI+9btXHz0GM=";
};
ports = [ "${builtins.toString port}:${builtins.toString port}" ];
environment = {
domain = "cloud.dgnum.eu";
extra_params = "--o:ssl.enable=false --o:ssl.termination=true --o:remote_font_config.url=https://cloud.dgnum.eu/apps/richdocuments/settings/fonts.json";
};
extraOptions = [
"--network=host"
"--cap-add"
"MKNOD"
"--cap-add"
"SYS_ADMIN"
];
};
remote_font_config.url = "https://cloud.dgnum.eu/apps/richdocuments/settings/fonts.json";
net.proto = "IPv4";
};
dgn-web.internalPorts.collabora = port;
aliasGroups = [ { host = "https://cloud.dgnum.eu"; } ];
};
services.nginx.virtualHosts = {
nginx.virtualHosts = {
${host} = {
enableACME = true;
forceSSL = true;
@ -182,6 +176,9 @@ in
'';
};
};
};
dgn-web.internalPorts.collabora = port;
systemd.services = {
nextcloud-preview = {
@ -200,6 +197,10 @@ in
networking.hosts = {
"129.199.146.148" = [ "s3.dgnum.eu" ];
"129.199.146.147" = [
"code.dgnum.eu"
"cloud.dgnum.eu"
];
};
age-secrets.autoMatch = [ "nextcloud" ];

View file

@ -48,6 +48,12 @@ in
excludes = [ ".git-blame-ignore-revs" ];
hash = "sha256-ca7CsPuWJqucC77ejsvoDAt+wxWLUP30IdXtZQVQrko=";
}
# Add Collabora Online
{
id = 330708;
hash = "sha256-655zkmch5VLXEUzhT6+b7QpywslDoIMZ8mY0II55Wlw=";
}
];
"nixos-unstable" = [