This commit is contained in:
2025-09-20 11:13:28 +03:00
parent 9b5d393bab
commit cb14814677
3 changed files with 82 additions and 68 deletions
+39 -39
View File
@@ -26,7 +26,7 @@
redis = true;
memcached = true;
};
maxUploadSize = "2G";
maxUploadSize = "5G";
config = {
dbtype = "pgsql";
dbuser = "nextcloud";
@@ -92,6 +92,7 @@
ssl = {
enable = false;
termination = true;
ssl_verification = false;
};
net = {
listen = "loopback";
@@ -110,45 +111,44 @@
# rabbitmq.enable = false;
};
# networking.hosts = {
# "127.0.0.1" = [
# "nextcloud.zeroq.ru"
# "collabora.zeroq.com"
# ];
# "::1" = [
# "nextcloud.zeroq.ru"
# "collabora.zeroq.ru"
# ];
# };
networking.hosts = {
"127.0.0.1" = [
"nextcloud.zeroq.ru"
"collabora.zeroq.com"
];
"::1" = [
"nextcloud.zeroq.ru"
"collabora.zeroq.ru"
];
};
# systemd.services.nextcloud-config-collabora =
# let
# inherit (config.services.nextcloud) occ;
# wopi_url = "http://[::1]:${toString config.services.collabora-online.port}";
# public_wopi_url = "https://collabora.zeroq.ru";
# wopi_allowlist = lib.concatStringsSep "," [
# "127.0.0.1"
# "::1"
# ];
# in
# {
# wantedBy = [ "multi-user.target" ];
# after = [
# "nextcloud-setup.service"
# "coolwsd.service"
# ];
# requires = [ "coolwsd.service" ];
# script = ''
# ${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_url --value ${lib.escapeShellArg wopi_url}
# ${occ}/bin/nextcloud-occ config:app:set richdocuments public_wopi_url --value ${lib.escapeShellArg public_wopi_url}
# ${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_allowlist --value ${lib.escapeShellArg wopi_allowlist}
# ${occ}/bin/nextcloud-occ richdocuments:setup
# '';
# serviceConfig = {
# Type = "oneshot";
# };
# };
systemd.services.nextcloud-config-collabora =
let
inherit (config.services.nextcloud) occ;
wopi_url = "http://[::1]:${toString config.services.collabora-online.port}";
public_wopi_url = "https://collabora.zeroq.ru";
wopi_allowlist = lib.concatStringsSep "," [
"127.0.0.1"
"::1"
];
in
{
wantedBy = [ "multi-user.target" ];
after = [
"nextcloud-setup.service"
"coolwsd.service"
];
requires = [ "coolwsd.service" ];
script = ''
${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_url --value ${lib.escapeShellArg wopi_url}
${occ}/bin/nextcloud-occ config:app:set richdocuments public_wopi_url --value ${lib.escapeShellArg public_wopi_url}
${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_allowlist --value ${lib.escapeShellArg wopi_allowlist}
${occ}/bin/nextcloud-occ richdocuments:setup
'';
serviceConfig = {
Type = "oneshot";
};
};
fileSystems."/mnt/nextcloud" = {
device = "${xlib.dirs.nextcloud-folder}";