diff --git a/hosts/nas/configuration.nix b/hosts/nas/configuration.nix index b0965c5..99751bb 100644 --- a/hosts/nas/configuration.nix +++ b/hosts/nas/configuration.nix @@ -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; diff --git a/modules/apps/onlyoffice/default.nix b/modules/apps/onlyoffice/default.nix new file mode 100644 index 0000000..867477a --- /dev/null +++ b/modules/apps/onlyoffice/default.nix @@ -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; + }; + }; + }; +} diff --git a/modules/apps/onlyoffice/options.nix b/modules/apps/onlyoffice/options.nix new file mode 100644 index 0000000..75c0b43 --- /dev/null +++ b/modules/apps/onlyoffice/options.nix @@ -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"; + }; + }; +} diff --git a/modules/default.nix b/modules/default.nix index 1561564..3726612 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -14,6 +14,7 @@ ./apps/mealie ./apps/nextcloud ./apps/ollama + ./apps/onlyoffice ./apps/open-webui ./apps/orca-slicer ./apps/puter