blob: 9bf897bf737a3d12e80c5ae9939c0c36ddfdaa3c (
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
|
{
config,
lib,
pkgs,
username,
...
}:
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;
bandwidth = 1024;
logLevel = "info";
upnp.enable = true;
proto = {
i2pControl.enable = true;
http.enable = true;
httpProxy.enable = true;
socksProxy = {
enable = true;
outproxyEnable = true;
};
sam.enable = true;
};
yggdrasil = {
enable = true;
# address = "";
};
ssu2 = {
enable = true;
# published = true;
};
};
})
(lib.mkIf cfg.enableBrowser {
home-manager.users.${username}.home.packages = [ pkgs.mullvad-browser ];
})
];
}
|