This commit is contained in:
pazpi 2026-02-15 23:20:36 +01:00
parent e641c5b9b4
commit 256689e389
No known key found for this signature in database
12 changed files with 54 additions and 38 deletions

View file

@ -55,24 +55,21 @@ in
services.collabora-online = {
enable = true;
settings =
{
net.listen = "0.0.0.0";
settings = {
net.listen = "0.0.0.0";
# terminate TLS at Caddy, NOT in coolwsd
ssl.enable = false;
ssl.termination = true;
# terminate TLS at Caddy, NOT in coolwsd
ssl.enable = false;
ssl.termination = true;
# allow WOPI (Nextcloud etc.)
storage.wopi."@allow" = true;
}
// lib.optionalAttrs (cfg.trustedDomains != [ ]) {
# Restrict which hosts may use WOPI (e.g. only your Nextcloud).
# Collabora expects regexes here, so escape dots.
storage.wopi.host = map
(d: builtins.replaceStrings [ "." ] [ "\\." ] d)
cfg.trustedDomains;
};
# allow WOPI (Nextcloud etc.)
storage.wopi."@allow" = true;
}
// lib.optionalAttrs (cfg.trustedDomains != [ ]) {
# Restrict which hosts may use WOPI (e.g. only your Nextcloud).
# Collabora expects regexes here, so escape dots.
storage.wopi.host = map (d: builtins.replaceStrings [ "." ] [ "\\." ] d) cfg.trustedDomains;
};
};
networking.firewall.allowedTCPPorts = [

View file

@ -97,4 +97,3 @@ in
};
}

View file

@ -16,10 +16,14 @@ let
sha256 = "sha256-kL7tVHXZunqGFztbVx850QQ1U5h5wY1ltIONWXwe7QQ=";
};
phpPackage = pkgs.php.withExtensions ({ enabled, all }: enabled ++ [
all.curl
all.dom
]);
phpPackage = pkgs.php.withExtensions (
{ enabled, all }:
enabled
++ [
all.curl
all.dom
]
);
in
{
@ -51,7 +55,13 @@ in
};
poolSettings = lib.mkOption {
type = with lib.types; attrsOf (oneOf [ str int bool ]);
type =
with lib.types;
attrsOf (oneOf [
str
int
bool
]);
default = {
"pm" = "dynamic";
"pm.max_children" = 8;
@ -133,11 +143,13 @@ in
user = cfg.user;
group = cfg.group;
phpPackage = phpPackage;
settings = lib.mapAttrs (name: lib.mkDefault) {
"listen.owner" = config.services.caddy.user;
"listen.group" = config.services.caddy.group;
"chdir" = cfg.dataDir;
} // cfg.poolSettings;
settings =
lib.mapAttrs (name: lib.mkDefault) {
"listen.owner" = config.services.caddy.user;
"listen.group" = config.services.caddy.group;
"chdir" = cfg.dataDir;
}
// cfg.poolSettings;
};
# Caddy configuration for serving PHP
@ -169,4 +181,3 @@ in
})
];
}

View file

@ -67,7 +67,11 @@ in
};
# Add npm/nodejs to n8n's PATH
systemd.services.n8n.path = [ pkgs.nodejs pkgs.gnutar pkgs.gzip ];
systemd.services.n8n.path = [
pkgs.nodejs
pkgs.gnutar
pkgs.gzip
];
})

View file

@ -68,7 +68,7 @@ in
package = pkgs.nextcloud32;
hostName = "cloud.${cfg.proxy.domain}";
https = true;
secretFile = cfg.secretFile;
settings = {

View file

@ -263,9 +263,9 @@ in
cp -r ${rutorrentPkgs}/php ${cfg.dataDir}/
${optionalString (cfg.plugins != [ ])
''cp -r ${
"cp -r ${
concatMapStringsSep " " (p: "${rutorrentPkgs}/plugins/${p}") cfg.plugins
} ${cfg.dataDir}/plugins/''
} ${cfg.dataDir}/plugins/"
}
chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}/{conf,share,logs,plugins}