diff options
-rw-r--r-- | makefu/1systems/gum/config.nix | 7 | ||||
-rw-r--r-- | makefu/2configs/storj/client.nix | 27 | ||||
-rw-r--r-- | makefu/2configs/storj/forward-port.nix | 22 |
3 files changed, 55 insertions, 1 deletions
diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index 2fd99122a..d81aefb67 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -43,6 +43,7 @@ in { <stockholm/makefu/2configs/zsh-user.nix> <stockholm/makefu/2configs/mosh.nix> + <stockholm/makefu/2configs/storj/forward-port.nix> # <stockholm/makefu/2configs/gui/xpra.nix> # networking @@ -156,6 +157,7 @@ in { <stockholm/makefu/2configs/bgt/download.binaergewitter.de.nix> <stockholm/makefu/2configs/bgt/hidden_service.nix> <stockholm/makefu/2configs/bgt/backup.nix> + <stockholm/makefu/2configs/bgt/social-to-irc.nix> # <stockholm/makefu/2configs/logging/client.nix> @@ -203,7 +205,10 @@ in { # Network networking = { firewall = { - allowedTCPPorts = [ 80 443 ]; + allowedTCPPorts = [ + 80 443 + 28967 # storj + ]; allowPing = true; logRefusedConnections = false; }; diff --git a/makefu/2configs/storj/client.nix b/makefu/2configs/storj/client.nix new file mode 100644 index 000000000..e37e2ce23 --- /dev/null +++ b/makefu/2configs/storj/client.nix @@ -0,0 +1,27 @@ +{ lib, ... }: +{ + networking.firewall.allowedTCPPorts = [ 28967 ]; + virtualisation.oci-containers.containers.storj-storagenode = { + image = "storjlabs/storagenode:latest"; + ports = [ + # TODO: omo ip + "0.0.0.0:28967:28967" + "127.0.0.1:14002:14002" + ]; + environment = { + # SETUP = "true"; # must be run only once ... + WALLET = "0xeD0d2a2B33F6812b45d2D9FF7a139A3fF65a24C0"; + EMAIL = "storj.io@syntax-fehler.de"; + ADDRESS = "euer.krebsco.de:28967"; + STORAGE = "3TB"; + }; + volumes = [ + "/media/cryptX/lib/storj/identity:/app/identity" + "/media/cryptX/lib/storj/storage:/app/config" + ]; + }; + systemd.services.docker-storj-storagenode.serviceConfig = { + StandardOutput = lib.mkForce "journal"; + StandardError = lib.mkForce "journal"; + }; +} diff --git a/makefu/2configs/storj/forward-port.nix b/makefu/2configs/storj/forward-port.nix new file mode 100644 index 000000000..213f77470 --- /dev/null +++ b/makefu/2configs/storj/forward-port.nix @@ -0,0 +1,22 @@ +{ + networking.firewall.allowedTCPPorts = [ 28967 ]; + #networking.nat.forwardPorts = [ + # { # storj + # destination = "10.243.0.89:28967"; + # proto = "tcp"; + # sourcePort = 28967; + # } + #]; + services.nginx.appendConfig = '' + stream { + upstream storj { + server omo.r:28967; + } + + server { + listen 28967; + proxy_pass storj; + } + } + ''; +} |