Add onlyoffice service
This commit is contained in:
parent
4bd733777a
commit
5f2bbb255c
4 changed files with 42 additions and 11 deletions
15
flake.nix
15
flake.nix
|
@ -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 {
|
||||
inherit system;
|
||||
modules = [
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
./grafana
|
||||
./authentik
|
||||
./postgresql
|
||||
./onlyoffice
|
||||
];
|
||||
}
|
||||
|
|
|
@ -109,11 +109,11 @@ in
|
|||
recommendedProxySettings = true;
|
||||
};
|
||||
};
|
||||
"collabora.le43.eu" = {
|
||||
"office.le43.eu" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://192.168.1.46:9980";
|
||||
proxyPass = "http://192.168.1.46:8000";
|
||||
proxyWebsockets = true;
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
|
@ -135,15 +135,6 @@ in
|
|||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
"netbox.le43.eu" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://192.168.1.45";
|
||||
recommendedProxySettings = true;
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
"uptime.le43.eu" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
|
24
services/onlyoffice/default.nix
Normal file
24
services/onlyoffice/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue