nixos/services.jicofo: remove with lib;
This commit is contained in:
parent
050c81941d
commit
0cca8e9756
@ -1,7 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.jicofo;
|
cfg = config.services.jicofo;
|
||||||
|
|
||||||
@ -10,10 +7,10 @@ let
|
|||||||
configFile = format.generate "jicofo.conf" cfg.config;
|
configFile = format.generate "jicofo.conf" cfg.config;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.services.jicofo = with types; {
|
options.services.jicofo = with lib.types; {
|
||||||
enable = mkEnableOption "Jitsi Conference Focus - component of Jitsi Meet";
|
enable = lib.mkEnableOption "Jitsi Conference Focus - component of Jitsi Meet";
|
||||||
|
|
||||||
xmppHost = mkOption {
|
xmppHost = lib.mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
example = "localhost";
|
example = "localhost";
|
||||||
description = ''
|
description = ''
|
||||||
@ -21,7 +18,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
xmppDomain = mkOption {
|
xmppDomain = lib.mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
example = "meet.example.org";
|
example = "meet.example.org";
|
||||||
description = ''
|
description = ''
|
||||||
@ -31,7 +28,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
componentPasswordFile = mkOption {
|
componentPasswordFile = lib.mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
example = "/run/keys/jicofo-component";
|
example = "/run/keys/jicofo-component";
|
||||||
description = ''
|
description = ''
|
||||||
@ -39,7 +36,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
userName = mkOption {
|
userName = lib.mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
default = "focus";
|
default = "focus";
|
||||||
description = ''
|
description = ''
|
||||||
@ -47,7 +44,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
userDomain = mkOption {
|
userDomain = lib.mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
example = "auth.meet.example.org";
|
example = "auth.meet.example.org";
|
||||||
description = ''
|
description = ''
|
||||||
@ -55,7 +52,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
userPasswordFile = mkOption {
|
userPasswordFile = lib.mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
example = "/run/keys/jicofo-user";
|
example = "/run/keys/jicofo-user";
|
||||||
description = ''
|
description = ''
|
||||||
@ -63,7 +60,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
bridgeMuc = mkOption {
|
bridgeMuc = lib.mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
example = "jvbbrewery@internal.meet.example.org";
|
example = "jvbbrewery@internal.meet.example.org";
|
||||||
description = ''
|
description = ''
|
||||||
@ -71,10 +68,10 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkOption {
|
config = lib.mkOption {
|
||||||
type = format.type;
|
type = format.type;
|
||||||
default = { };
|
default = { };
|
||||||
example = literalExpression ''
|
example = lib.literalExpression ''
|
||||||
{
|
{
|
||||||
jicofo.bridge.max-bridge-participants = 42;
|
jicofo.bridge.max-bridge-participants = 42;
|
||||||
}
|
}
|
||||||
@ -85,7 +82,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.jicofo.config = {
|
services.jicofo.config = {
|
||||||
jicofo = {
|
jicofo = {
|
||||||
bridge.brewery-jid = cfg.bridgeMuc;
|
bridge.brewery-jid = cfg.bridgeMuc;
|
||||||
@ -120,7 +117,7 @@ in
|
|||||||
restartTriggers = [
|
restartTriggers = [
|
||||||
configFile
|
configFile
|
||||||
];
|
];
|
||||||
environment.JAVA_SYS_PROPS = concatStringsSep " " (mapAttrsToList (k: v: "${k}=${toString v}") jicofoProps);
|
environment.JAVA_SYS_PROPS = lib.concatStringsSep " " (lib.mapAttrsToList (k: v: "${k}=${toString v}") jicofoProps);
|
||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
export JICOFO_AUTH_PASS="$(<${cfg.userPasswordFile})"
|
export JICOFO_AUTH_PASS="$(<${cfg.userPasswordFile})"
|
||||||
@ -154,7 +151,7 @@ in
|
|||||||
|
|
||||||
environment.etc."jitsi/jicofo/sip-communicator.properties".text = "";
|
environment.etc."jitsi/jicofo/sip-communicator.properties".text = "";
|
||||||
environment.etc."jitsi/jicofo/logging.properties".source =
|
environment.etc."jitsi/jicofo/logging.properties".source =
|
||||||
mkDefault "${pkgs.jicofo}/etc/jitsi/jicofo/logging.properties-journal";
|
lib.mkDefault "${pkgs.jicofo}/etc/jitsi/jicofo/logging.properties-journal";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta.maintainers = lib.teams.jitsi.members;
|
meta.maintainers = lib.teams.jitsi.members;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user