temporarily disabled transmission.
This commit is contained in:
		
							parent
							
								
									fe87cf397e
								
							
						
					
					
						commit
						478d5760bd
					
				
					 2 changed files with 56 additions and 56 deletions
				
			
		| 
						 | 
				
			
			@ -116,14 +116,14 @@ in {
 | 
			
		|||
              description = "Torrent webUI";
 | 
			
		||||
            };
 | 
			
		||||
          }
 | 
			
		||||
          {
 | 
			
		||||
            Transmission = {
 | 
			
		||||
              icon = "sh-transmission.svg";
 | 
			
		||||
              href = "http:cirrostratus:9090";
 | 
			
		||||
              siteMonitor = "http:cirrostratus:9091";
 | 
			
		||||
              description = "Torrent webUI";
 | 
			
		||||
            };
 | 
			
		||||
          }
 | 
			
		||||
          # {
 | 
			
		||||
          #   Transmission = {
 | 
			
		||||
          #     icon = "sh-transmission.svg";
 | 
			
		||||
          #     href = "http:cirrostratus:9091";
 | 
			
		||||
          #     siteMonitor = "http:cirrostratus:9091";
 | 
			
		||||
          #     description = "Torrent webUI";
 | 
			
		||||
          #   };
 | 
			
		||||
          # }
 | 
			
		||||
          {
 | 
			
		||||
            Syncthing = {
 | 
			
		||||
              icon = "sh-syncthing.svg";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -104,52 +104,52 @@ in {
 | 
			
		|||
    };
 | 
			
		||||
  };
 | 
			
		||||
  #transmission, another torrent client.
 | 
			
		||||
  services.transmission = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    package = pkgs.transmission_4;
 | 
			
		||||
    user = user;
 | 
			
		||||
    group = group;
 | 
			
		||||
    openPeerPorts = true;
 | 
			
		||||
    openRPCPort = true;
 | 
			
		||||
    webHome = pkgs.flood-for-transmission;
 | 
			
		||||
    settings = {
 | 
			
		||||
      utp-enabled = true;
 | 
			
		||||
      watch-dir = "/storage/torrent/watch";
 | 
			
		||||
      watch-dir-enabled = true;
 | 
			
		||||
      incomplete-dir = "/storage/torrent/incomplete";
 | 
			
		||||
      incomplete-dir-enabled = true;
 | 
			
		||||
      download-dir = "/storage/torrent/complete";
 | 
			
		||||
      rpc-bind-address = "100.0.0.0";
 | 
			
		||||
      rpc-port = transmissionWebPort;
 | 
			
		||||
      rpc-whitelist-enabled = false;
 | 
			
		||||
      rpc-host-whitelist-enabled = false;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  systemd.services.transmission = {
 | 
			
		||||
    # binding transmission to network namespace
 | 
			
		||||
    bindsTo = ["netns@${namespace}.service"];
 | 
			
		||||
    requires = ["network-online.target" "${namespace}.service"];
 | 
			
		||||
    serviceConfig.NetworkNamespacePath = ["/var/run/netns/${namespace}"];
 | 
			
		||||
  };
 | 
			
		||||
  # allowing transmissionweb to access transmission in network namespace, a socket is necesarry
 | 
			
		||||
  systemd.sockets."proxy-to-transmission" = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    description = "Socket for Proxy to Transmission Daemon";
 | 
			
		||||
    listenStreams = ["${toString transmissionWebPort}"];
 | 
			
		||||
    wantedBy = ["sockets.target"];
 | 
			
		||||
  };
 | 
			
		||||
  # creating proxy service on socket, which forwards the same port from the root namespace to the isolated namespace
 | 
			
		||||
  systemd.services."proxy-to-transmission" = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    description = "Proxy to Transmission Web UI in Network Namespace";
 | 
			
		||||
    requires = ["transmission.service" "proxy-to-transmission.socket"];
 | 
			
		||||
    after = ["transmission.service" "proxy-to-transmission.socket"];
 | 
			
		||||
    unitConfig = {JoinsNamespaceOf = "transmission.service";};
 | 
			
		||||
    serviceConfig = {
 | 
			
		||||
      User = user;
 | 
			
		||||
      Group = group;
 | 
			
		||||
      ExecStart = "${pkgs.systemd}/lib/systemd/systemd-socket-proxyd --exit-idle-time=5min 0.0.0.0:${toString transmissionWebPort}";
 | 
			
		||||
      PrivateNetwork = "yes";
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  # services.transmission = {
 | 
			
		||||
  #   enable = true;
 | 
			
		||||
  #   package = pkgs.transmission_4;
 | 
			
		||||
  #   user = user;
 | 
			
		||||
  #   group = group;
 | 
			
		||||
  #   openPeerPorts = true;
 | 
			
		||||
  #   openRPCPort = true;
 | 
			
		||||
  #   webHome = pkgs.flood-for-transmission;
 | 
			
		||||
  #   settings = {
 | 
			
		||||
  #     utp-enabled = true;
 | 
			
		||||
  #     watch-dir = "/storage/torrent/watch";
 | 
			
		||||
  #     watch-dir-enabled = true;
 | 
			
		||||
  #     incomplete-dir = "/storage/torrent/incomplete";
 | 
			
		||||
  #     incomplete-dir-enabled = true;
 | 
			
		||||
  #     download-dir = "/storage/torrent/complete";
 | 
			
		||||
  #     rpc-bind-address = "100.0.0.0/8";
 | 
			
		||||
  #     rpc-port = transmissionWebPort;
 | 
			
		||||
  #     rpc-whitelist-enabled = false;
 | 
			
		||||
  #     rpc-host-whitelist-enabled = false;
 | 
			
		||||
  #   };
 | 
			
		||||
  # };
 | 
			
		||||
  # systemd.services.transmission = {
 | 
			
		||||
  #   # binding transmission to network namespace
 | 
			
		||||
  #   bindsTo = ["netns@${namespace}.service"];
 | 
			
		||||
  #   requires = ["network-online.target" "${namespace}.service"];
 | 
			
		||||
  #   serviceConfig.NetworkNamespacePath = ["/var/run/netns/${namespace}"];
 | 
			
		||||
  # };
 | 
			
		||||
  # # allowing transmissionweb to access transmission in network namespace, a socket is necesarry
 | 
			
		||||
  # systemd.sockets."proxy-to-transmission" = {
 | 
			
		||||
  #   enable = true;
 | 
			
		||||
  #   description = "Socket for Proxy to Transmission Daemon";
 | 
			
		||||
  #   listenStreams = ["${toString transmissionWebPort}"];
 | 
			
		||||
  #   wantedBy = ["sockets.target"];
 | 
			
		||||
  # };
 | 
			
		||||
  # # creating proxy service on socket, which forwards the same port from the root namespace to the isolated namespace
 | 
			
		||||
  # systemd.services."proxy-to-transmission" = {
 | 
			
		||||
  #   enable = true;
 | 
			
		||||
  #   description = "Proxy to Transmission Web UI in Network Namespace";
 | 
			
		||||
  #   requires = ["transmission.service" "proxy-to-transmission.socket"];
 | 
			
		||||
  #   after = ["transmission.service" "proxy-to-transmission.socket"];
 | 
			
		||||
  #   unitConfig = {JoinsNamespaceOf = "transmission.service";};
 | 
			
		||||
  #   serviceConfig = {
 | 
			
		||||
  #     User = user;
 | 
			
		||||
  #     Group = group;
 | 
			
		||||
  #     ExecStart = "${pkgs.systemd}/lib/systemd/systemd-socket-proxyd --exit-idle-time=5min 0.0.0.0:${toString transmissionWebPort}";
 | 
			
		||||
  #     PrivateNetwork = "yes";
 | 
			
		||||
  #   };
 | 
			
		||||
  # };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue