modules/nextcloud-whiteboard: add nextcloud whiteboard server
This commit is contained in:
parent
f8f92f59b4
commit
68d007a39a
1 changed files with 36 additions and 0 deletions
36
modules/nextcloud-whiteboard/default.nix
Normal file
36
modules/nextcloud-whiteboard/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
whiteboardServerDomain = "whiteboard.${config.momo-cloud.networking.domain}";
|
||||
whiteboardServerPort = 3002;
|
||||
in
|
||||
{
|
||||
options.momo-cloud.nextcloud-whiteboard = {
|
||||
enable = lib.mkEnableOption "enable nextcloud-whiteboard-server and required components";
|
||||
secretFile = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.momo-cloud.nextcloud-whiteboard.enable {
|
||||
services.nginx.virtualHosts."${whiteboardServerDomain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString whiteboardServerPort}/";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.nextcloud-whiteboard-server = {
|
||||
enable = true;
|
||||
settings = {
|
||||
NEXTCLOUD_URL = "https://cloud.${config.momo-cloud.networking.domain}";
|
||||
STORAGE_STRATEGY = "lru";
|
||||
PORT = "${toString whiteboardServerPort}";
|
||||
};
|
||||
secrets = [ config.momo-cloud.nextcloud-whiteboard.secretFile ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue