25 lines
659 B
Nix
25 lines
659 B
Nix
|
{ config, pkgs, lib, ... }:
|
||
|
let
|
||
|
cfg = config.services.vm_onlyoffice;
|
||
|
in
|
||
|
{
|
||
|
options.services.vm_onlyoffice = {
|
||
|
enable = lib.mkEnableOption "Enable OnlyOffice service";
|
||
|
};
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
services = {
|
||
|
onlyoffice = {
|
||
|
enable = true;
|
||
|
hostname = "office.le43.eu";
|
||
|
port = "8000";
|
||
|
postgresName = "onlyoffice";
|
||
|
postgresHost = "${cfg.db_ip}";
|
||
|
postgresUser = "onlyoffice";
|
||
|
postgresPasswordFile = "/run/secrets/onlyoffice/office-dbpass";
|
||
|
jwtSecretFile = "/run/secrets/onlyoffice/office-jwtpass";
|
||
|
};
|
||
|
};
|
||
|
networking.firewall.allowedTCPPorts = [ 8000 ];
|
||
|
};
|
||
|
}
|