This repository has no description
2.4 kB
86 lines
1{
2 config,
3 pkgs,
4 ...
5}:
6{
7 # Generate Radicle identity keys using clan vars
8 clan.core.vars.generators.radicle = {
9 files."radicle.key" = { };
10 files."radicle.pub".secret = false;
11 runtimeInputs = [ pkgs.openssh ];
12 script = ''
13 ssh-keygen -t ed25519 -N "" -C "radicle" -f "$out/radicle.key"
14 mv "$out/radicle.key.pub" "$out/radicle.pub"
15 '';
16 };
17
18 services.radicle = {
19 enable = true;
20 privateKey = config.clan.core.vars.generators.radicle.files."radicle.key".path;
21 publicKey = config.clan.core.vars.generators.radicle.files."radicle.pub".path;
22
23 node.openFirewall = true;
24
25 httpd = {
26 enable = true;
27 # The default 8080 is taken on neoprism by jitsi-videobridge's REST
28 # API (Jetty, 127.0.0.1:8080): radicle-httpd died with "Address
29 # already in use" on every restart and nginx proxied
30 # radicle.lassul.us to Jetty's 404 page instead.
31 listenPort = 8778;
32 nginx = {
33 serverName = "radicle.lassul.us";
34 enableACME = true;
35 forceSSL = true;
36 };
37 };
38
39 settings = {
40 publicExplorer = "https://app.radicle.xyz/nodes/$host/$rid$path";
41 preferredSeeds = [
42 "z6MkrLMMsiPWUcNPHcRajuMi9mDfYckSoJyPwwnknocNYPm7@seed.radicle.xyz:8776"
43 "z6Mkmqogy2qEM2ummccUthFEaaHvyYmYBYh3dbe9W4ebScxo@iris.radicle.network:8776"
44 ];
45 web.pinned.repositories = [ ];
46 cli.hints = true;
47 node = {
48 alias = config.networking.hostName;
49 listen = [ "0.0.0.0:8776" ];
50 peers.type = "dynamic";
51 connect = [ ];
52 externalAddresses = [ "radicle.lassul.us:8776" ];
53 network = "main";
54 log = "INFO";
55 relay = "auto";
56 limits = {
57 routingMaxSize = 1000;
58 routingMaxAge = 604800;
59 gossipMaxAge = 1209600;
60 fetchConcurrency = 1;
61 maxOpenFiles = 4096;
62 rate = {
63 inbound = {
64 fillRate = 5.0;
65 capacity = 1024;
66 };
67 outbound = {
68 fillRate = 10.0;
69 capacity = 2048;
70 };
71 };
72 connection = {
73 inbound = 128;
74 outbound = 16;
75 };
76 fetchPackReceive = "500.0 MiB";
77 };
78 workers = 8;
79 seedingPolicy = {
80 default = "allow";
81 scope = "all";
82 };
83 };
84 };
85 };
86}