summaryrefslogtreecommitdiff
path: root/os/srv/i2p.nix
diff options
context:
space:
mode:
Diffstat (limited to 'os/srv/i2p.nix')
-rw-r--r--os/srv/i2p.nix63
1 files changed, 44 insertions, 19 deletions
diff --git a/os/srv/i2p.nix b/os/srv/i2p.nix
index 8850795..f2c27b1 100644
--- a/os/srv/i2p.nix
+++ b/os/srv/i2p.nix
@@ -1,32 +1,57 @@
{
config,
lib,
+ pkgs,
+ username,
...
}:
let
cfg = config.os.srv.i2p;
in
{
- options.os.srv.i2p.enable = lib.mkEnableOption "enables i2pd";
+ options.os.srv.i2p = {
+ enable = lib.mkEnableOption "enables i2pd";
+ enableBrowser = lib.mkEnableOption "enables mullvad browser and creates a desktop entry";
+ };
- config = lib.mkIf cfg.enable {
- services.i2pd = {
- enable = true;
- upnp.enable = true;
- bandwidth = 1024;
- ssu2 = {
+ config = lib.mkMerge [
+ (lib.mkIf cfg.enable {
+ services.i2pd = {
enable = true;
- # published = 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;
+ };
};
- reseed.verify = true;
- # proto = {
- # socksProxy = {
- # enable = true;
- # port = 4445;
- # };
- # i2pControl.enable = true;
- # };
- yggdrasil.enable = true;
- };
- };
+ })
+ (lib.mkIf cfg.enableBrowser {
+ home-manager.users.${username} = {
+ home.packages = [ pkgs.mullvad-browser ];
+ xdg.desktopEntries = {
+ i2p-browser = {
+ name = "i2p Browser";
+ genericName = "Web Browser";
+ exec = "${pkgs.mullvad-browser}/bin/mullvad-browser -p i2p";
+ };
+ };
+ };
+ })
+ ];
}