ghatanothoa: Neues Jitsi #17
3 changed files with 61 additions and 25 deletions
|
@ -3,13 +3,17 @@ flake-inputs:
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
(import ./jitsi.nix flake-inputs)
|
../../modules/jitsi.nix
|
||||||
nerf marked this conversation as resolved
Outdated
|
|||||||
../../roles
|
../../roles
|
||||||
./network.nix
|
./network.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# System configuration here
|
services.mathebau-jitsi = {
|
||||||
|
enable = true;
|
||||||
|
hostName = "meet.mathebau.de";
|
||||||
|
};
|
||||||
|
|
||||||
|
# System configuration here
|
||||||
networking.hostName = "ghatanothoa";
|
networking.hostName = "ghatanothoa";
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
flake-inputs:
|
|
||||||
{pkgs, config, lib, modulesPath, ...}: {
|
|
||||||
imports = [(modulesPath + "/services/web-apps/jitsi-meet.nix")];
|
|
||||||
|
|
||||||
services.jitsi-meet = {
|
|
||||||
enable = true;
|
|
||||||
hostName = "meet.mathebau.de";
|
|
||||||
config = {
|
|
||||||
defaultLang = "de";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.jitsi-videobridge = {
|
|
||||||
openFirewall = true;
|
|
||||||
nat = {
|
|
||||||
publicAddress = "130.83.2.184";
|
|
||||||
localAddress = "192.168.0.25";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.nginx.virtualHosts."meet.mathebau.de".enableACME = false;
|
|
||||||
services.nginx.virtualHosts."meet.mathebau.de".forceSSL = false;
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
||||||
networking.firewall.allowedUDPPorts = [ 10000 ];
|
|
||||||
}
|
|
55
nixos/modules/jitsi.nix
Normal file
55
nixos/modules/jitsi.nix
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
{pkgs, config, lib, modulesPath, ...}:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
mkIf
|
||||||
|
mkEnableOption
|
||||||
|
mkOption
|
||||||
|
head;
|
||||||
|
inherit (lib.types) str;
|
||||||
|
cfg = config.services.mathebau-jitsi;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [(modulesPath + "/services/web-apps/jitsi-meet.nix")];
|
||||||
|
|
||||||
|
options.services.mathebau-jitsi = {
|
||||||
|
enable = mkEnableOption "mathebau jitsi service";
|
||||||
|
hostName = mkOption {
|
||||||
|
type = str;
|
||||||
|
};
|
||||||
Gonne marked this conversation as resolved
Outdated
nerf
commented
I think setting I think setting `default = null;` is not the same as setting no default.
I guess you want no default so just delete the line.
(See [lengthy reference](https://nixos.org/nixos/manual/#sec-writing-modules))
|
|||||||
|
localAddress = mkOption {
|
||||||
|
type = str;
|
||||||
|
default = (head config.networking.interfaces.enX0.ipv4.addresses).address;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.jitsi-meet = {
|
||||||
|
enable = true;
|
||||||
|
hostName = cfg.hostName;
|
||||||
|
config = {
|
||||||
|
defaultLang = "de";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.jitsi-videobridge = {
|
||||||
|
openFirewall = true;
|
||||||
|
nat = {
|
||||||
|
publicAddress = "130.83.2.184";
|
||||||
|
localAddress = cfg.localAddress;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.persistence.${config.impermanence.name} = {
|
||||||
|
directories = [
|
||||||
|
"/var/lib/jitsi-meet"
|
||||||
|
"/var/lib/prosody"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
#We are behind a reverse proxy that handles TLS
|
||||||
|
services.nginx.virtualHosts."${cfg.hostName}" = {
|
||||||
|
enableACME = false;
|
||||||
|
forceSSL = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
#The network ports for HTTP(S) are not opened automatically
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue
jitsi.nix does not use flake-inputs ever, why not scratch that parameter from the module and don't apply it here