35 lines
770 B
Nix
35 lines
770 B
Nix
{
|
|
config,
|
|
lib,
|
|
namespace,
|
|
...
|
|
}:
|
|
let
|
|
name = "onlyoffice";
|
|
cfg = config.${namespace}.services.${name};
|
|
net = lib.${namespace}.network;
|
|
jwtSecretFile = config.sops.secrets."jallen-nas/onlyoffice-key".path;
|
|
|
|
onlyofficeConfig = lib.${namespace}.mkModule {
|
|
inherit config name;
|
|
description = "onlyoffice";
|
|
options = { };
|
|
moduleConfig = {
|
|
services.onlyoffice = {
|
|
enable = true;
|
|
inherit (cfg) port;
|
|
wopi = true;
|
|
hostname = "office.mjallen.dev";
|
|
jwtSecretFile = jwtSecretFile;
|
|
securityNonceFile = jwtSecretFile;
|
|
postgresHost = net.hosts.nas.lan;
|
|
postgresUser = "onlyoffice";
|
|
postgresName = "onlyoffice";
|
|
};
|
|
};
|
|
};
|
|
in
|
|
{
|
|
imports = [ onlyofficeConfig ];
|
|
}
|