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