add onlyoffice

This commit is contained in:
mjallen18
2024-07-10 09:01:51 -05:00
parent f420ad44f2
commit 833c911a4a
4 changed files with 81 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ in
powerManagement.cpuFreqGovernor = "powersave";
nas-apps = {
collabora.enable = true;
collabora.enable = false;
deluge.enable = true;
@@ -80,6 +80,8 @@ in
ollama.enable = true;
onlyoffice.enable = true;
open-webui.enable = true;
orca-slicer.enable = true;

View File

@@ -0,0 +1,30 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.nas-apps.onlyoffice;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [ "${cfg.port}:80" ];
volumes = [
# ...
];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
JWT_SECRET = cfg.jwtSecret;
};
};
};
}

View File

@@ -0,0 +1,47 @@
{ lib, ... }:
with lib;
{
options.nas-apps.onlyoffice = {
enable = mkEnableOption "onlyoffice docker service";
autoStart = mkOption {
type = types.bool;
default = true;
};
port = mkOption {
type = types.str;
default = "9980";
};
name = mkOption {
type = types.str;
default = "onlyoffice";
};
image = mkOption {
type = types.str;
default = "onlyoffice/documentserver";
};
puid = mkOption {
type = types.str;
default = "911";
};
pgid = mkOption {
type = types.str;
default = "1000";
};
timeZone = mkOption {
type = types.str;
default = "America/Chicago";
};
jwtSecret = mkOption {
type = types.str;
default = "BogieDudie1";
};
};
}

View File

@@ -14,6 +14,7 @@
./apps/mealie
./apps/nextcloud
./apps/ollama
./apps/onlyoffice
./apps/open-webui
./apps/orca-slicer
./apps/puter