nextcloud broke lmao
This commit is contained in:
@@ -104,6 +104,11 @@ let
|
||||
handle @ntfy {
|
||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.ntfy.port}
|
||||
}
|
||||
|
||||
@office host office.mjallen.dev
|
||||
handle @office {
|
||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.onlyoffice.port}
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5,64 +5,29 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.${namespace}) mkOpt;
|
||||
cfg = config.${namespace}.services.onlyoffice;
|
||||
in
|
||||
{
|
||||
options.${namespace}.services.onlyoffice = with lib; {
|
||||
enable = lib.mkEnableOption "";
|
||||
name = "onlyoffice";
|
||||
cfg = config.${namespace}.services.${name};
|
||||
jwtSecretFile = config.sops.secrets."jallen-nas/onlyoffice-key".path;
|
||||
|
||||
port = mkOpt types.int 9943 "Port for opencloud to be hosted on";
|
||||
|
||||
configPath = mkOpt types.str "/media/nas/main/nix-app-data/onlyoffice" "Path to the data dir";
|
||||
|
||||
puid = mkOpt types.str "911" "puid";
|
||||
|
||||
pgid = mkOpt types.str "1000" "pgid";
|
||||
|
||||
timeZone = mkOpt types.str "America/Chicago" "container tz";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# services.nginx.virtualHosts."office.mjallen.dev".listen = [
|
||||
# {
|
||||
# addr = "0.0.0.0";
|
||||
# port = 9943;
|
||||
# }
|
||||
# ];
|
||||
# services.onlyoffice = {
|
||||
# enable = true;
|
||||
# port = 9943;
|
||||
# hostname = "office.mjallen.dev";
|
||||
# jwtSecretFile = jwtSecretFile;
|
||||
# securityNonceFile = jwtSecretFile;
|
||||
# };
|
||||
virtualisation.oci-containers.containers.onlyoffice = {
|
||||
autoStart = true;
|
||||
image = "onlyoffice/documentserver";
|
||||
ports = [
|
||||
"${toString cfg.port}:80"
|
||||
];
|
||||
volumes = [
|
||||
"${cfg.configPath}/logs:/var/log/onlyoffice"
|
||||
"${cfg.configPath}/data:/var/www/onlyoffice/Data"
|
||||
"${cfg.configPath}/lib:/var/lib/onlyoffice"
|
||||
"${cfg.configPath}/db:/var/lib/postgresql"
|
||||
];
|
||||
environmentFiles = [ ];
|
||||
environment = {
|
||||
DB_TYPE = "postgres";
|
||||
DB_HOST = "10.0.1.3";
|
||||
DB_PORT = "5432";
|
||||
DB_USER = "onlyoffice";
|
||||
REDIS_SERVER_HOST = "10.0.1.3";
|
||||
REDIS_SERVER_PORT = "6381";
|
||||
WOPI_ENABLED = "true";
|
||||
JWT_SECRET = "BogieDudie1";
|
||||
PUID = cfg.puid;
|
||||
PGID = cfg.pgid;
|
||||
TZ = cfg.timeZone;
|
||||
onlyofficeConfig = lib.${namespace}.mkModule {
|
||||
inherit config name;
|
||||
description = "onlyoffice";
|
||||
options = { };
|
||||
moduleConfig = {
|
||||
services.onlyoffice = {
|
||||
enable = true;
|
||||
port = cfg.port;
|
||||
wopi = true;
|
||||
hostname = "office.mjallen.dev";
|
||||
jwtSecretFile = jwtSecretFile;
|
||||
securityNonceFile = jwtSecretFile;
|
||||
postgresHost = "10.0.1.3";
|
||||
postgresUser = "onlyoffice";
|
||||
postgresName = "onlyoffice";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ onlyofficeConfig ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user