Add onlyoffice service

This commit is contained in:
Théo Barnouin 2025-01-07 13:55:31 +01:00
parent 4bd733777a
commit 5f2bbb255c
4 changed files with 42 additions and 11 deletions

View file

@ -68,6 +68,21 @@
} }
]; ];
}; };
onlyoffice = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
agenix.nixosModules.default
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
"${inputs.self}/systems/minimalLXCConfig.nix"
"${inputs.self}/services"
{
networking.hostName = "onlyoffice";
services.vm_onlyoffice = {
enable = true;
};
}
];
};
template = nixpkgs.lib.nixosSystem { template = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [

View file

@ -9,5 +9,6 @@
./grafana ./grafana
./authentik ./authentik
./postgresql ./postgresql
./onlyoffice
]; ];
} }

View file

@ -109,11 +109,11 @@ in
recommendedProxySettings = true; recommendedProxySettings = true;
}; };
}; };
"collabora.le43.eu" = { "office.le43.eu" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://192.168.1.46:9980"; proxyPass = "http://192.168.1.46:8000";
proxyWebsockets = true; proxyWebsockets = true;
recommendedProxySettings = true; recommendedProxySettings = true;
}; };
@ -135,15 +135,6 @@ in
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };
"netbox.le43.eu" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://192.168.1.45";
recommendedProxySettings = true;
proxyWebsockets = true;
};
};
"uptime.le43.eu" = { "uptime.le43.eu" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;

View file

@ -0,0 +1,24 @@
{ 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 ];
};
}