nextcloud broke lmao
This commit is contained in:
@@ -104,6 +104,11 @@ let
|
|||||||
handle @ntfy {
|
handle @ntfy {
|
||||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.ntfy.port}
|
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
|
let
|
||||||
inherit (lib.${namespace}) mkOpt;
|
name = "onlyoffice";
|
||||||
cfg = config.${namespace}.services.onlyoffice;
|
cfg = config.${namespace}.services.${name};
|
||||||
in
|
jwtSecretFile = config.sops.secrets."jallen-nas/onlyoffice-key".path;
|
||||||
{
|
|
||||||
options.${namespace}.services.onlyoffice = with lib; {
|
|
||||||
enable = lib.mkEnableOption "";
|
|
||||||
|
|
||||||
port = mkOpt types.int 9943 "Port for opencloud to be hosted on";
|
onlyofficeConfig = lib.${namespace}.mkModule {
|
||||||
|
inherit config name;
|
||||||
configPath = mkOpt types.str "/media/nas/main/nix-app-data/onlyoffice" "Path to the data dir";
|
description = "onlyoffice";
|
||||||
|
options = { };
|
||||||
puid = mkOpt types.str "911" "puid";
|
moduleConfig = {
|
||||||
|
services.onlyoffice = {
|
||||||
pgid = mkOpt types.str "1000" "pgid";
|
enable = true;
|
||||||
|
port = cfg.port;
|
||||||
timeZone = mkOpt types.str "America/Chicago" "container tz";
|
wopi = true;
|
||||||
};
|
hostname = "office.mjallen.dev";
|
||||||
|
jwtSecretFile = jwtSecretFile;
|
||||||
config = lib.mkIf cfg.enable {
|
securityNonceFile = jwtSecretFile;
|
||||||
# services.nginx.virtualHosts."office.mjallen.dev".listen = [
|
postgresHost = "10.0.1.3";
|
||||||
# {
|
postgresUser = "onlyoffice";
|
||||||
# addr = "0.0.0.0";
|
postgresName = "onlyoffice";
|
||||||
# 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;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ onlyofficeConfig ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ in
|
|||||||
};
|
};
|
||||||
ocis = disabled;
|
ocis = disabled;
|
||||||
onlyoffice = {
|
onlyoffice = {
|
||||||
enable = false;
|
enable = true;
|
||||||
port = 9200;
|
port = 9200;
|
||||||
};
|
};
|
||||||
opencloud = {
|
opencloud = {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
host nextcloud nextcloud 10.0.1.0/24 trust
|
host nextcloud nextcloud 10.0.1.0/24 trust
|
||||||
host nextcloud nextcloud ::1/128 trust
|
host nextcloud nextcloud ::1/128 trust
|
||||||
local onlyoffice onlyoffice trust
|
local onlyoffice onlyoffice trust
|
||||||
host onlyoffice onlyoffice 10.88.0.0/24 trust
|
host onlyoffice onlyoffice 10.0.1.0/24 trust
|
||||||
local synapse synapse trust
|
local synapse synapse trust
|
||||||
host synapse synapse ::1/128 trust
|
host synapse synapse ::1/128 trust
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user