blob: fa7f102bb38befbc72a8e82687a3f84f73c85498 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
{
config,
lib,
pkgs,
...
}:
let
cfg = config.os.srv.i2p;
in
{
options.os.srv.i2p = {
enable = lib.mkEnableOption "enables i2pd";
enableBrowser = lib.mkEnableOption "enables mullvad browser for browsing eepsites";
};
config = lib.mkMerge [
(lib.mkIf cfg.enable {
services.i2pd = {
enable = true;
enableIPv6 = true;
# upnp.enable = true;
bandwidth = 1024;
reseed.verify = true;
ntcp2 = {
enable = true;
# published = true;
};
ssu2 = {
enable = true;
# published = true;
};
yggdrasil = {
enable = true;
address = "200:5857:a255:4db6:8687:6928:ddc4:dad6";
};
proto = {
http.enable = true;
httpProxy.enable = true;
socksProxy = {
enable = true;
outproxyEnable = true;
};
sam.enable = true;
i2pControl.enable = true;
};
};
# environment.systemPackages = [ pkgs.i2pd-tools ];
})
(lib.mkIf cfg.enableBrowser {
environment.systemPackages = [ pkgs.mullvad-browser ];
})
];
}
|