diff options
author | Rory& <root@rory.gay> | 2024-07-04 14:59:36 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-07-04 14:59:36 +0200 |
commit | dd7b872694441a96b8b042ccbc4b63a96d0b89b9 (patch) | |
tree | 76a25875e08415c38cdb7b5ad8f93241b387d078 /host/Rory-nginx/services/nginx/rory.gay/jitsi.nix | |
parent | Update flake inputs (diff) | |
download | Rory-Open-Architecture-dd7b872694441a96b8b042ccbc4b63a96d0b89b9.tar.xz |
Nixfmt
Diffstat (limited to 'host/Rory-nginx/services/nginx/rory.gay/jitsi.nix')
-rwxr-xr-x | host/Rory-nginx/services/nginx/rory.gay/jitsi.nix | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/host/Rory-nginx/services/nginx/rory.gay/jitsi.nix b/host/Rory-nginx/services/nginx/rory.gay/jitsi.nix index c2feaa1..f6091bc 100755 --- a/host/Rory-nginx/services/nginx/rory.gay/jitsi.nix +++ b/host/Rory-nginx/services/nginx/rory.gay/jitsi.nix @@ -1,13 +1,19 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - overrideJs = filePath: varName: newContent: appendExtra: + overrideJs = + filePath: varName: newContent: appendExtra: let oldContent = builtins.readFile filePath; regex = "var ${varName} = {[^}]*};"; newJs = builtins.replaceStrings [ regex ] [ "var ${varName} = ${newContent};" ] oldContent; in - builtins.writeFile filePath newJs; + builtins.writeFile filePath newJs; cfg = config.services.jitsi-meet; in @@ -33,13 +39,7 @@ in proxy_set_header Host $host; ''; }; - locations."=/external_api.js" = lib.mkDefault { - alias = "${pkgs.jitsi-meet}/libs/external_api.min.js"; - }; - locations."=/config.js" = lib.mkDefault { - alias = overrideJs "${pkgs.jitsi-meet}/config.js" "config" (lib.recursiveUpdate defaultCfg cfg.config) cfg.extraConfig; - }; - locations."=/interface_config.js" = lib.mkDefault { - alias = overrideJs "${pkgs.jitsi-meet}/interface_config.js" "interfaceConfig" cfg.interfaceConfig ""; - }; -} \ No newline at end of file + locations."=/external_api.js" = lib.mkDefault { alias = "${pkgs.jitsi-meet}/libs/external_api.min.js"; }; + locations."=/config.js" = lib.mkDefault { alias = overrideJs "${pkgs.jitsi-meet}/config.js" "config" (lib.recursiveUpdate defaultCfg cfg.config) cfg.extraConfig; }; + locations."=/interface_config.js" = lib.mkDefault { alias = overrideJs "${pkgs.jitsi-meet}/interface_config.js" "interfaceConfig" cfg.interfaceConfig ""; }; +} |