diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 01:35:06 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 02:11:48 +0200 |
commit | 1a64deeb894dc95e2645a75771732c6cc53a79ad (patch) | |
tree | 1b9df4838f894577a09b9b260151756272efeb53 /systems/eldiron/coturn.nix | |
parent | fa25ffd4583cc362075cd5e1b4130f33306103f0 (diff) | |
download | Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip |
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them
contained personnal information about users. All thos changes got
stashed into a single commit (history is kept in a different place) and
private information was moved in a separate private repository
Diffstat (limited to 'systems/eldiron/coturn.nix')
-rw-r--r-- | systems/eldiron/coturn.nix | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/systems/eldiron/coturn.nix b/systems/eldiron/coturn.nix new file mode 100644 index 0000000..d8b02c5 --- /dev/null +++ b/systems/eldiron/coturn.nix | |||
@@ -0,0 +1,73 @@ | |||
1 | { config, name, lib, pkgs, ... }: | ||
2 | { | ||
3 | config = lib.mkIf (name == "eldiron") { | ||
4 | myServices.chatonsProperties.services.coturn = { | ||
5 | file.datetime = "2022-08-27T19:00:00"; | ||
6 | service = { | ||
7 | name = "Coturn"; | ||
8 | description = "coturn TURN server"; | ||
9 | status.level = "OK"; | ||
10 | status.description = "OK"; | ||
11 | registration."" = ["MEMBER" "CLIENT"]; | ||
12 | registration.load = "FULL"; | ||
13 | install.type = "PACKAGE"; | ||
14 | }; | ||
15 | software = { | ||
16 | name = "coturn"; | ||
17 | website = "https://github.com/coturn/coturn"; | ||
18 | license.url = "https://github.com/coturn/coturn/blob/master/LICENSE"; | ||
19 | license.name = "3-Clause BSD License"; | ||
20 | version = pkgs.coturn.version; | ||
21 | source.url = "https://github.com/coturn/coturn"; | ||
22 | }; | ||
23 | }; | ||
24 | networking.firewall.allowedTCPPorts = [ | ||
25 | config.services.coturn.alt-listening-port | ||
26 | config.services.coturn.alt-tls-listening-port | ||
27 | config.services.coturn.listening-port | ||
28 | config.services.coturn.tls-listening-port | ||
29 | ]; | ||
30 | networking.firewall.allowedTCPPortRanges = [ | ||
31 | { from = config.services.coturn.min-port; to = config.services.coturn.max-port; } | ||
32 | ]; | ||
33 | networking.firewall.allowedUDPPortRanges = [ | ||
34 | { from = config.services.coturn.min-port; to = config.services.coturn.max-port; } | ||
35 | ]; | ||
36 | networking.firewall.allowedUDPPorts = [ | ||
37 | config.services.coturn.alt-listening-port | ||
38 | config.services.coturn.alt-tls-listening-port | ||
39 | config.services.coturn.listening-port | ||
40 | config.services.coturn.tls-listening-port | ||
41 | ]; | ||
42 | #users.users.turnserver.extraGroups = [ "keys" ]; | ||
43 | services.coturn = { | ||
44 | enable = true; | ||
45 | no-cli = true; | ||
46 | no-tls = true; | ||
47 | no-dtls = true; | ||
48 | use-auth-secret = true; | ||
49 | lt-cred-mech = true; | ||
50 | realm = "eldiron.immae.eu"; | ||
51 | extraConfig = '' | ||
52 | fingerprint | ||
53 | total-quota=0 | ||
54 | bps-capacity=0 | ||
55 | stale-nonce | ||
56 | no-multicast-peers | ||
57 | ''; | ||
58 | static-auth-secret = config.myEnv.coturn.auth_access_key; | ||
59 | #cert = "/var/lib/acme/eldiron/fullchain.pem"; | ||
60 | #pkey = "/var/lib/acme/eldiron/key.pem"; | ||
61 | listening-ips = [ | ||
62 | "127.0.0.1" | ||
63 | "::1" | ||
64 | ] ++ config.myEnv.servers.eldiron.ips.main.ip4 | ||
65 | ++ config.myEnv.servers.eldiron.ips.main.ip6; | ||
66 | relay-ips = [ | ||
67 | "127.0.0.1" | ||
68 | "::1" | ||
69 | ] ++ config.myEnv.servers.eldiron.ips.main.ip4 | ||
70 | ++ config.myEnv.servers.eldiron.ips.main.ip6; | ||
71 | }; | ||
72 | }; | ||
73 | } | ||