alpha
Login
or
Join now
lass.pds.lassul.us
/
superconfig
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
1
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
1
Pipelines
machines.ignavia: add mycelium
author
lassulus
date
2 years ago
(Mar 3, 2024, 8:39 AM CET)
commit
b31fbfd1
b31fbfd1844255fa0c815dfaeae90b2c909bf0bb
parent
93bc460b
93bc460b4acfec92d096868eec9c9e87dcef3ef5
+74
2 changed files
Expand all
Collapse all
Unified
Split
2configs
mycelium.nix
machines
ignavia
config.nix
+73
2configs/mycelium.nix
View file
Reviewed
···
1
1
+
{ self, config, lib, pkgs, ... }:
2
2
+
let
3
3
+
peers = [
4
4
+
### official servers
5
5
+
"tcp://188.40.132.242:9651" # DE 01
6
6
+
"tcp://[2a01:4f8:221:1e0b::2]:9651"
7
7
+
"quic://188.40.132.242:9651"
8
8
+
"quic://[2a01:4f8:221:1e0b::2]:9651"
9
9
+
10
10
+
"tcp://136.243.47.186:9651" # DE 02
11
11
+
"tcp://[2a01:4f8:212:fa6::2]:9651"
12
12
+
"quic://136.243.47.186:9651"
13
13
+
"quic://[2a01:4f8:212:fa6::2]:9651"
14
14
+
15
15
+
"tcp://185.69.166.7:9651" # BE 03
16
16
+
"tcp://[2a02:1802:5e:0:8478:51ff:fee2:3331]:9651"
17
17
+
"quic://185.69.166.7:9651"
18
18
+
"quic://[2a02:1802:5e:0:8478:51ff:fee2:3331]:9651"
19
19
+
20
20
+
"tcp://185.69.166.8:9651" # BE 04
21
21
+
"tcp://[2a02:1802:5e:0:8c9e:7dff:fec9:f0d2]:9651"
22
22
+
"quic://185.69.166.8:9651"
23
23
+
"quic://[2a02:1802:5e:0:8c9e:7dff:fec9:f0d2]:9651"
24
24
+
25
25
+
"tcp://65.21.231.58:9651" # FI 05
26
26
+
"tcp://[2a01:4f9:6a:1dc5::2]:9651"
27
27
+
"quic://65.21.231.58:9651"
28
28
+
"quic://[2a01:4f9:6a:1dc5::2]:9651"
29
29
+
30
30
+
"tcp://65.109.18.113:9651" # FI 06
31
31
+
"tcp://[2a01:4f9:5a:1042::2]:9651"
32
32
+
"quic://65.109.18.113:9651"
33
33
+
"quic://[2a01:4f9:5a:1042::2]:9651"
34
34
+
];
35
35
+
in
36
36
+
{
37
37
+
networking.firewall.allowedTCPPorts = [ 9651 ];
38
38
+
networking.firewall.allowedUDPPorts = [ 9650 9651 ];
39
39
+
40
40
+
systemd.services.mycelium = {
41
41
+
description = "Mycelium network";
42
42
+
wantedBy = [ "multi-user.target" ];
43
43
+
44
44
+
serviceConfig = {
45
45
+
ExecStart = lib.concatStringsSep " " (lib.flatten [
46
46
+
(lib.getExe self.packages.${pkgs.system}.mycelium)
47
47
+
"--key-file ${config.clanCore.secrets.mycelium.secrets.mycelium_key.path}"
48
48
+
"--tun-name myc"
49
49
+
"--peers" peers
50
50
+
]);
51
51
+
Restart = "always";
52
52
+
RestartSec = 2;
53
53
+
StateDirectory = "mycelium";
54
54
+
55
55
+
# TODO: Hardening
56
56
+
};
57
57
+
};
58
58
+
59
59
+
# TODO get public key from mycelium
60
60
+
# TODO get ip from key
61
61
+
clanCore.secrets.mycelium = {
62
62
+
secrets."mycelium_key" = { };
63
63
+
generator = {
64
64
+
path = [
65
65
+
self.packages.${pkgs.system}.mycelium
66
66
+
pkgs.coreutils
67
67
+
];
68
68
+
script = ''
69
69
+
timeout 5 mycelium --key-file "$secrets"/mycelium_key || :
70
70
+
'';
71
71
+
};
72
72
+
};
73
73
+
}
+1
machines/ignavia/config.nix
View file
Reviewed
···
30
30
# ../../2configs/print.nix
31
31
# ../../2configs/br.nix
32
32
# ../../2configs/c-base.nix
33
33
+
../../2configs/mycelium.nix
33
34
{ # clan backups playground
34
35
imports = [
35
36
self.inputs.clan-core.clanModules.borgbackup