summary refs log tree commit diff
path: root/host
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-29 22:56:04 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-29 22:56:18 +0200
commit7b43df5d73af8faf11e78601c560cbdeaabc5498 (patch)
tree2dc79746faca309eaa1d928c29ed117e341b49a7 /host
parentAdd WSL config (diff)
downloadRory-Open-Architecture-7b43df5d73af8faf11e78601c560cbdeaabc5498.tar.xz
Jitsi?
Diffstat (limited to 'host')
-rwxr-xr-xhost/Rory-nginx/configuration.nix1
-rwxr-xr-xhost/Rory-nginx/services/containers/matrixunittests/container.nix2
-rwxr-xr-xhost/Rory-nginx/services/jitsi.nix270
-rwxr-xr-xhost/Rory-nginx/services/nginx/nginx.nix2
-rwxr-xr-xhost/Rory-nginx/services/nginx/rory.gay/jitsi.nix32
5 files changed, 306 insertions, 1 deletions
diff --git a/host/Rory-nginx/configuration.nix b/host/Rory-nginx/configuration.nix
index 28b6125..4261b43 100755
--- a/host/Rory-nginx/configuration.nix
+++ b/host/Rory-nginx/configuration.nix
@@ -11,6 +11,7 @@
       ./services/discordbots.nix
       ./services/matrix/root.nix
       ./services/nginx/nginx.nix
+      ./services/jitsi.nix
     ];
   users.groups.ocp = {};
   networking = {
diff --git a/host/Rory-nginx/services/containers/matrixunittests/container.nix b/host/Rory-nginx/services/containers/matrixunittests/container.nix
index 7c15e04..597b1cf 100755
--- a/host/Rory-nginx/services/containers/matrixunittests/container.nix
+++ b/host/Rory-nginx/services/containers/matrixunittests/container.nix
@@ -16,7 +16,7 @@
       '';
     networking.firewall = {
       enable = true;
-      allowedTCPPorts = [ 80 ];  
+      allowedTCPPorts = [ 80 5432 ];
     };
   };  
   hostAddress = "192.168.100.12";
diff --git a/host/Rory-nginx/services/jitsi.nix b/host/Rory-nginx/services/jitsi.nix
new file mode 100755
index 0000000..27ce78b
--- /dev/null
+++ b/host/Rory-nginx/services/jitsi.nix
@@ -0,0 +1,270 @@
+{ config, pkgs, lib, ... }:
+
+{
+  services.jitsi-meet = {
+    enable = true;
+    nginx.enable = false;
+    interfaceConfig = {
+      APP_NAME = 'Rory&'s Jitsi Meet Instance';
+      AUDIO_LEVEL_PRIMARY_COLOR = "rgba(255,0,255,0.5)";
+      AUDIO_LEVEL_SECONDARY_COLOR = "rgba(255,0,255,0.25)";
+      AUTO_PIN_LATEST_SCREEN_SHARE = true;
+      BRAND_WATERMARK_LINK = "https://rory.gay";
+      CLOSE_PAGE_GUEST_HINT = false;
+      DEFAULT_BACKGROUND = "#000000";
+      DEFAULT_WELCOME_PAGE_LOGO_URL = "";
+      DISABLE_DOMINANT_SPEAKER_INDICATOR = true;
+      DISABLE_JOIN_LEAVE_NOTIFICATIONS = true;
+      DISABLE_PRESENCE_STATUS = true;
+      DISABLE_TRANSCRIPTION_SUBTITLES = true;
+      DISABLE_VIDEO_BACKGROUND = true;
+      DISABLE_WELCOME_FOOTER = false;
+      DISPLAY_WELCOME_PAGE_ADDITIONAL_CARD = false;
+      DISPLAY_WELCOME_PAGE_CONTENT = false;
+      DISPLAY_WELCOME_PAGE_TOOLBAR_ADDITIONAL_CONTENT = false;
+      ENABLE_DIAL_OUT = false;
+      FILM_STRIP_MAX_HEIGHT = 80;
+      HIDE_INVITE_MORE_HEADER = true;
+      JITSI_WATERMARK_LINK = "";
+      LANG_DETECTION = false;
+      LOCAL_THUMBNAIL_RATIO = 16 / 9;
+      MAXIMUM_ZOOMING_COEFFICIENT = 2;
+      MOBILE_APP_PROMO = false;
+      OPTIMAL_BROWSERS = [ "firefox" ];
+      POLICY_LOGO = "";
+      PROVIDER_NAME = "Rory&'s Jitsi Meet Instance";
+      SETTINGS_SECTIONS = [ 'devices' 'language' 'moderator' 'profile' 'calendar' 'sounds' 'more' ];
+      SHARING_FEATURES = [ 'url' 'embed' ];
+      SHOW_BRAND_WATERMARK = true;
+      SHOW_CHROME_EXTENSION_BANNER = false;
+      SHOW_JITSI_WATERMARK = false;
+      SHOW_POWERED_BY = false;
+      SHOW_PROMOTIONAL_CLOSE_PAGE = false;
+      VERTICAL_FILMSTRIP = false;
+      VIDEO_LAYOUT_FIT = "nocrop";
+      VIDEO_QUALITY_LABEL_DISABLED = false;
+      INDICATOR_FONT_SIZES = {
+        'localParticipantDisplayName' = 16,
+        'remoteParticipantDisplayName' = 16,
+        'remoteParticipantAudioIndicator' = 12,
+        'remoteParticipantVideoIndicator' = 12,
+      };
+    };
+    config = {
+      #hosts.domain = "jitsi.rory.gay";
+      testing = {
+        assumeBandwidth = false;
+        noAutoPlayVideo = false;
+        callStatsTreshold = 100;
+      };
+      disableModeratorIndicator = false;
+      disableReactions = false;
+      disableReactionsModeration = false;
+      disablePolls = false;
+      disableSelfView = false;
+      disableSelfViewSettings = false;
+      screenshotCapture = {
+        enabled = true;
+        mode = "always";
+      };
+      disableAudioLevels = false;
+      audioLevelsInterval = 12;
+      enableNoAudioDetection = true;
+      enableSaveLogs = false;
+      disableShowMoreStats = false;
+      enableNoisyMicDetection = false;
+      startAudioOnly = false;
+      startAudioMuted = 100;
+      startSilent = false;
+      enableOpusRed = true;
+      audioQuality = {
+        stereo = false;
+        opusMaxAverageBitrate = 51000;
+        enableOpusDtx = true;
+      };
+      resolution = 720;
+      disableRemoveRaisedHandOnFocus = false;
+      speakerStats = {
+        disabled = false;
+        disableSearc = false;
+        order = [
+          "role"
+          "name"
+          "left"
+        ];
+      };
+      maxFullResolutionParticipants = 10;
+      constraints = {
+        video = {
+          height = {
+            ideal = 720;
+            max = 1080;
+            min = 144;
+          };
+        };
+      };
+      disableSimulcast = false;
+      startVideoMuted = 50;
+      startWithVideoMuted = false;
+      desktopSharingFrameRate = {
+        min = 5;
+        max = 5;
+      };
+      recordingService.enabled = false;
+      localRecording = {
+        disable = true;
+        notifyAllParticipants = true;
+        disableSelfRecording = true;
+      };
+      transcription.enabled = false;
+      connectionIndicators = {
+        autoHide = false;
+        autoHideTimeout = 5000;
+        disabled = false;
+        disableDetails = false;
+        inactiveDisabled = false;
+      };
+      videoQuality = {
+        codecPreferenceOrder = [ "VP9" "VP8" "H264" ];
+        maxBitratesVideo = {
+          H264 = {
+            low = 200000; # 200 kbps
+            standard = 500000; # 500 kbps
+            high = 700000; # 700 kbps
+          };
+          VP8 = {
+            low = 200000; # 200 kbps
+            standard = 500000; # 500 kbps
+            high = 700000; # 700 kbps
+          };
+          VP9 = {
+            low = 200000; # 200 kbps
+            standard = 500000; # 500 kbps
+            high = 700000; # 700 kbps
+          };
+        };
+      };
+      notificationTimeouts = {
+        short = 2000;
+        moderate = 4000;
+        long = 600;
+      };
+      disableRtx = false;
+      disableBeforeUnloadHandler = false;
+
+      # UI settings
+      disableResponsiveTiles = false;
+      requireDisplayName = true;
+      enableWebHID = true;
+      welcomePage = {
+        disabled = true;
+        customUrl = "https://jitsi.rory.gay/null";
+      };
+      lobby = {
+        autoKnock = true;
+        enableChat = true;
+      };
+      securityUi = {
+        hideLobbyButton = false;
+        disableLobbyPassword = false;
+      };
+      disableShortcuts = true;
+      disableInitialGUM = true;
+      enableClosePage = false;
+      disable1On1Mode = true;
+      defaultLocalDisplayName = "User";
+      defaultRemoteDisplayName = "Other User";
+      hideDisplayName = false;
+      hideDominantSpeakerBadge = false;
+      disableProfile = false;
+      hideEmailInSettings = true;
+      roomPasswordNumberOfDigits = false;
+      enableCalendarIntegration = false;
+      prejoinConfig = {
+        enabled = true;
+        hideDisplayName = false;
+        hideExtraJoinButtons = ["by-phone"];
+      };
+      openSharedDocumentOnJoin = false;
+      enableInsecureRoomNameWarning = false;
+      enableAutomaticUrlCopy = false;
+      toolbarButtons = [
+        "camera"
+        "chat"
+        #"closedcaptions"
+        "desktop"
+        "download"
+        "embedmeeting"
+        #"etherpad"
+        #"feedback"
+        "filmstrip"
+        "fullscreen"
+        "hangup"
+        #"help"
+        "highlight"
+        "invite"
+        #"linktosalesforce"
+        "livestreaming"
+        "microphone"
+        "noisesuppression"
+        "participants-pane"
+        "profile"
+        "raisehand"
+        #"recording"
+        "security"
+        "select-background"
+        "settings"
+        "shareaudio"
+        "sharedvideo"
+        "shortcuts"
+        "stats"
+        "tileview"
+        "toggle-camera"
+        "videoquality"
+        #"whiteboard"
+      ];
+      toolbarConfig = {
+        alwaysVisible = true;
+      };
+      gatherStats = true;
+      pcStatsInterval = 1000;
+      enableDisplayNameInStats = true;
+      feedbackPercentage = 0;
+      p2p = {
+        enabled = false;
+      };
+      analytics.disabled = true;
+      remoteVideoMenu = {
+        disabled = false;
+        disableKick = false;
+        disableGrantModerator = false;
+        disablePrivateChat = false;
+      };
+      disableRemoteMute = false;
+      enableLipSync = true;
+      participantsPane = {
+        hideModeratorSettingsTab = false;
+        hideMoreActionsButton = false;
+        hideMuteAllButton = false;
+      };
+      breakoutRooms = {
+        hideAddRoomButton = true;
+        hideAutoAssignButton = true;
+        hideJoinRoomButton = true;
+      };
+      disableVirtualBackground = true;
+      disableAddingBackgroundImages = true;
+      disableScreensharingVirtualBackground = true;
+      backgroundAlpha = 0.5;
+      hideConferenceTimer = false;
+      hideConferenceSubject = false;
+      hideParticipantsStats = false;
+      displayJids = true;
+      requireDisplayName = true;
+      disableChatSmileys = true;
+    };
+  };
+
+  system.stateVersion = "22.11"; # DO NOT EDIT!
+}
+
diff --git a/host/Rory-nginx/services/nginx/nginx.nix b/host/Rory-nginx/services/nginx/nginx.nix
index 4364a2b..3680052 100755
--- a/host/Rory-nginx/services/nginx/nginx.nix
+++ b/host/Rory-nginx/services/nginx/nginx.nix
@@ -49,6 +49,8 @@
         "catgirlsaresexy.com" = import ./catgirlsaresexy.com/root.nix;
         "sugarcanemc.org" = import ./sugarcanemc.org/root.nix;
 
+        "jitsi.rory.gay" = import ./rory.gay/jitsi.nix;
+
         #matrix...
         "conduit.rory.gay" = import ./rory.gay/conduit.nix;
         "matrix.rory.gay" = import ./rory.gay/matrix.nix;
diff --git a/host/Rory-nginx/services/nginx/rory.gay/jitsi.nix b/host/Rory-nginx/services/nginx/rory.gay/jitsi.nix
new file mode 100755
index 0000000..ad8dd89
--- /dev/null
+++ b/host/Rory-nginx/services/nginx/rory.gay/jitsi.nix
@@ -0,0 +1,32 @@
+{
+  enableACME = true;
+  addSSL = true;
+  extraConfig = ''
+    ssi on;
+  '';
+  locations."@root_path".extraConfig = ''
+    rewrite ^/(.*)$ / break;
+  '';
+  locations."~ ^/([^/\\?&:'\"]+)$".tryFiles = "$uri @root_path";
+  locations."^~ /xmpp-websocket" = {
+    priority = 100;
+    proxyPass = "http://localhost:5280/xmpp-websocket";
+    proxyWebsockets = true;
+  };
+  locations."=/http-bind" = {
+    proxyPass = "http://localhost:5280/http-bind";
+    extraConfig = ''
+      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+      proxy_set_header Host $host;
+    '';
+  };
+  locations."=/external_api.js" = mkDefault {
+    alias = "${pkgs.jitsi-meet}/libs/external_api.min.js";
+  };
+  locations."=/config.js" = mkDefault {
+    alias = overrideJs "${pkgs.jitsi-meet}/config.js" "config" (recursiveUpdate defaultCfg cfg.config) cfg.extraConfig;
+  };
+  locations."=/interface_config.js" = mkDefault {
+    alias = overrideJs "${pkgs.jitsi-meet}/interface_config.js" "interfaceConfig" cfg.interfaceConfig "";
+  };
+}
\ No newline at end of file