fixed synce errors
This commit is contained in:
@@ -4,20 +4,12 @@ let
|
|||||||
cfg = config.sovran_systemsOS;
|
cfg = config.sovran_systemsOS;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
# ✅ Option definition
|
|
||||||
>>>>>>> 5bee5ad99bb7890df011d88e9928b6944c3565f8
|
|
||||||
options.sovran_systemsOS.packages.bip110 = lib.mkOption {
|
options.sovran_systemsOS.packages.bip110 = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.package;
|
type = lib.types.nullOr lib.types.package;
|
||||||
default = null;
|
default = null;
|
||||||
description = "BIP110 Bitcoin package";
|
description = "BIP110 Bitcoin package";
|
||||||
};
|
};
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
# ✅ Implementation
|
|
||||||
>>>>>>> 5bee5ad99bb7890df011d88e9928b6944c3565f8
|
|
||||||
config = lib.mkIf (
|
config = lib.mkIf (
|
||||||
cfg.features.bip110 &&
|
cfg.features.bip110 &&
|
||||||
cfg.packages.bip110 != null
|
cfg.packages.bip110 != null
|
||||||
|
|||||||
@@ -1,54 +0,0 @@
|
|||||||
{config, pkgs, lib, ...}:
|
|
||||||
|
|
||||||
let
|
|
||||||
personalization = import ./personalization.nix;
|
|
||||||
|
|
||||||
in
|
|
||||||
lib.mkIf config.sovran_systemsOS.features.coturn {
|
|
||||||
|
|
||||||
systemd.services.coturn-helper = {
|
|
||||||
|
|
||||||
script = ''
|
|
||||||
|
|
||||||
systemctl restart coturn
|
|
||||||
|
|
||||||
'';
|
|
||||||
|
|
||||||
unitConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
After = "btcpayserver.service";
|
|
||||||
Requires = "network-online.target";
|
|
||||||
};
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
RemainAfterExit = "yes";
|
|
||||||
Type = "oneshot";
|
|
||||||
};
|
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
services.coturn = {
|
|
||||||
|
|
||||||
enable = true;
|
|
||||||
use-auth-secret = true;
|
|
||||||
static-auth-secret = "${personalization.coturn_static_auth_secret}";
|
|
||||||
realm = personalization.matrix_url;
|
|
||||||
cert = "/var/lib/coturn/${personalization.matrix_url}.crt.pem";
|
|
||||||
pkey = "/var/lib/coturn/${personalization.matrix_url}.key.pem";
|
|
||||||
min-port = 49152;
|
|
||||||
max-port = 65535;
|
|
||||||
listening-port = 5349;
|
|
||||||
no-cli = true;
|
|
||||||
extraConfig = ''
|
|
||||||
verbose
|
|
||||||
external-ip=${personalization.external_ip_secret}
|
|
||||||
stale-nonce
|
|
||||||
fingerprint
|
|
||||||
'';
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
personalization = import ./personalization.nix;
|
|
||||||
>>>>>>> 5bee5ad99bb7890df011d88e9928b6944c3565f8
|
|
||||||
livekitKeyFile = "/var/lib/livekit/livekit_keyFile";
|
livekitKeyFile = "/var/lib/livekit/livekit_keyFile";
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -19,10 +15,6 @@ lib.mkIf config.sovran_systemsOS.features.element-calling {
|
|||||||
description = "Generate LiveKit key file if missing";
|
description = "Generate LiveKit key file if missing";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
before = [ "livekit.service" "lk-jwt-service.service" ];
|
before = [ "livekit.service" "lk-jwt-service.service" ];
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
requires = [];
|
|
||||||
>>>>>>> 5bee5ad99bb7890df011d88e9928b6944c3565f8
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
@@ -47,7 +39,6 @@ lib.mkIf config.sovran_systemsOS.features.element-calling {
|
|||||||
systemd.services.lk-jwt-service.after = [ "livekit-key-setup.service" ];
|
systemd.services.lk-jwt-service.after = [ "livekit-key-setup.service" ];
|
||||||
systemd.services.lk-jwt-service.wants = [ "livekit-key-setup.service" ];
|
systemd.services.lk-jwt-service.wants = [ "livekit-key-setup.service" ];
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
####### CADDY SNIPPET — written to /run/caddy for caddy.nix to pick up #######
|
####### CADDY SNIPPET — written to /run/caddy for caddy.nix to pick up #######
|
||||||
systemd.services.element-calling-caddy-config = {
|
systemd.services.element-calling-caddy-config = {
|
||||||
description = "Generate Element Calling Caddy config snippet";
|
description = "Generate Element Calling Caddy config snippet";
|
||||||
@@ -67,19 +58,12 @@ lib.mkIf config.sovran_systemsOS.features.element-calling {
|
|||||||
|
|
||||||
cat > /run/caddy/element-calling.snippet <<EOF
|
cat > /run/caddy/element-calling.snippet <<EOF
|
||||||
$MATRIX {
|
$MATRIX {
|
||||||
=======
|
|
||||||
####### CADDY CONFIGS #######
|
|
||||||
services.caddy.virtualHosts = lib.mkForce {
|
|
||||||
"${personalization.matrix_url}" = {
|
|
||||||
extraConfig = ''
|
|
||||||
>>>>>>> 5bee5ad99bb7890df011d88e9928b6944c3565f8
|
|
||||||
reverse_proxy /_matrix/* http://localhost:8008
|
reverse_proxy /_matrix/* http://localhost:8008
|
||||||
reverse_proxy /_synapse/client/* http://localhost:8008
|
reverse_proxy /_synapse/client/* http://localhost:8008
|
||||||
header /.well-known/matrix/* Content-Type "application/json"
|
header /.well-known/matrix/* Content-Type "application/json"
|
||||||
header /.well-known/matrix/* Access-Control-Allow-Origin "*"
|
header /.well-known/matrix/* Access-Control-Allow-Origin "*"
|
||||||
header /.well-known/matrix/* Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
header /.well-known/matrix/* Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||||
header /.well-known/matrix/* Access-Control-Allow-Headers "X-Requested-With, Content-Type, Authorization"
|
header /.well-known/matrix/* Access-Control-Allow-Headers "X-Requested-With, Content-Type, Authorization"
|
||||||
<<<<<<< HEAD
|
|
||||||
respond /.well-known/matrix/client \`{ "m.homeserver": {"base_url": "https://$MATRIX" }, "org.matrix.msc4143.rtc_foci": [{ "type":"livekit", "livekit_service_url":"https://$ELEMENT_CALLING/livekit/jwt" }] }\`
|
respond /.well-known/matrix/client \`{ "m.homeserver": {"base_url": "https://$MATRIX" }, "org.matrix.msc4143.rtc_foci": [{ "type":"livekit", "livekit_service_url":"https://$ELEMENT_CALLING/livekit/jwt" }] }\`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,14 +72,6 @@ lib.mkIf config.sovran_systemsOS.features.element-calling {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ELEMENT_CALLING {
|
$ELEMENT_CALLING {
|
||||||
=======
|
|
||||||
respond /.well-known/matrix/client `{ "m.homeserver": {"base_url": "https://${personalization.matrix_url}" }, "org.matrix.msc4143.rtc_foci": [{ "type":"livekit", "livekit_service_url":"https://${personalization.element-calling_url}/livekit/jwt" }] }`
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"${personalization.element-calling_url}" = {
|
|
||||||
extraConfig = ''
|
|
||||||
>>>>>>> 5bee5ad99bb7890df011d88e9928b6944c3565f8
|
|
||||||
handle /livekit/jwt/sfu/get {
|
handle /livekit/jwt/sfu/get {
|
||||||
uri strip_prefix /livekit/jwt
|
uri strip_prefix /livekit/jwt
|
||||||
reverse_proxy [::1]:8073 {
|
reverse_proxy [::1]:8073 {
|
||||||
@@ -108,7 +84,6 @@ lib.mkIf config.sovran_systemsOS.features.element-calling {
|
|||||||
handle {
|
handle {
|
||||||
reverse_proxy localhost:7880
|
reverse_proxy localhost:7880
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
@@ -140,10 +115,6 @@ lib.mkIf config.sovran_systemsOS.features.element-calling {
|
|||||||
|
|
||||||
chmod 640 /run/livekit/runtime-config.yaml
|
chmod 640 /run/livekit/runtime-config.yaml
|
||||||
'';
|
'';
|
||||||
=======
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
>>>>>>> 5bee5ad99bb7890df011d88e9928b6944c3565f8
|
|
||||||
};
|
};
|
||||||
|
|
||||||
####### LIVEKIT SERVICE #######
|
####### LIVEKIT SERVICE #######
|
||||||
@@ -157,16 +128,8 @@ lib.mkIf config.sovran_systemsOS.features.element-calling {
|
|||||||
room.auto_create = false;
|
room.auto_create = false;
|
||||||
turn = {
|
turn = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
<<<<<<< HEAD
|
|
||||||
tls_port = 5349;
|
tls_port = 5349;
|
||||||
udp_port = 3478;
|
udp_port = 3478;
|
||||||
=======
|
|
||||||
domain = "${personalization.matrix_url}";
|
|
||||||
tls_port = 5349;
|
|
||||||
udp_port = 3478;
|
|
||||||
cert_file = "/var/lib/livekit/${personalization.matrix_url}.crt";
|
|
||||||
key_file = "/var/lib/livekit/${personalization.matrix_url}.key";
|
|
||||||
>>>>>>> 5bee5ad99bb7890df011d88e9928b6944c3565f8
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -177,7 +140,6 @@ lib.mkIf config.sovran_systemsOS.features.element-calling {
|
|||||||
];
|
];
|
||||||
|
|
||||||
####### JWT SERVICE #######
|
####### JWT SERVICE #######
|
||||||
<<<<<<< HEAD
|
|
||||||
systemd.services.lk-jwt-service-runtime-config = {
|
systemd.services.lk-jwt-service-runtime-config = {
|
||||||
description = "Generate lk-jwt-service runtime config from domain files";
|
description = "Generate lk-jwt-service runtime config from domain files";
|
||||||
before = [ "lk-jwt-service.service" ];
|
before = [ "lk-jwt-service.service" ];
|
||||||
@@ -253,29 +215,6 @@ lib.mkIf config.sovran_systemsOS.features.element-calling {
|
|||||||
extraConfigFiles = [ "/run/matrix-synapse/element-calling-config.yaml" ];
|
extraConfigFiles = [ "/run/matrix-synapse/element-calling-config.yaml" ];
|
||||||
settings = lib.mkForce {
|
settings = lib.mkForce {
|
||||||
push.include_content = false;
|
push.include_content = false;
|
||||||
=======
|
|
||||||
services.lk-jwt-service = {
|
|
||||||
enable = true;
|
|
||||||
port = 8073;
|
|
||||||
livekitUrl = "wss://${personalization.element-calling_url}";
|
|
||||||
keyFile = livekitKeyFile;
|
|
||||||
};
|
|
||||||
|
|
||||||
####### MATRIX-SYNAPSE SETTINGS #######
|
|
||||||
services.matrix-synapse = {
|
|
||||||
settings = lib.mkForce {
|
|
||||||
serve_server_wellknown = true;
|
|
||||||
public_baseurl = "${personalization.matrix_url}";
|
|
||||||
experimental_features = {
|
|
||||||
msc3266_enabled = true;
|
|
||||||
msc4222_enabled = true;
|
|
||||||
};
|
|
||||||
max_event_delay_duration = "24h";
|
|
||||||
rc_message = { per_second = 0.5; burst_count = 30; };
|
|
||||||
rc_delayed_event_mgmt = { per_second = 1; burst_count = 20; };
|
|
||||||
push.include_content = false;
|
|
||||||
server_name = personalization.matrix_url;
|
|
||||||
>>>>>>> 5bee5ad99bb7890df011d88e9928b6944c3565f8
|
|
||||||
url_preview_enabled = true;
|
url_preview_enabled = true;
|
||||||
group_unread_count_by_room = false;
|
group_unread_count_by_room = false;
|
||||||
encryption_enabled_by_default_for_room_type = "invite";
|
encryption_enabled_by_default_for_room_type = "invite";
|
||||||
|
|||||||
Reference in New Issue
Block a user