summaryrefslogtreecommitdiff
path: root/hosts/poweredge/transmission.nix
blob: 11a673e83ea29cb74c87a991babde1419e09aa25 (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
{
	containers.transmission-wg = let
		home = "/var/lib/transmission";
		download-dir = "${home}/complete";
		incomplete-dir = "${home}/incomplete";
		wg-conf = "${home}/wg0.conf";
	in {
		autoStart = true;
		privateNetwork = false;  # TODO
		enableTun = true;
		bindMounts = {
			"${download-dir}" = {
				hostPath = "";  # FIXME
				isReadOnly = false;
			};
			"${incomplete-dir}" = {
				hostPath = "";  # FIXME
				isReadOnly = false;
			};
		};

		config = { lib, config, ... }: {
			services.transmission = {
				inherit home;
				enable = true;

				settings = {
					inherit download-dir incomplete-dir;
					rpc-bind-address = "0.0.0.0";
					rpc-whitelist = "*";
					rpc-whitelist-enable = false;
				};
			};

			#networking.wg-quick.interfaces = {
			#	wg0.configFile = wg-conf;
			#};

			# TODO remove (#258793)
			systemd.services.transmission.serviceConfig = {
				RootDirectoryStartOnly = lib.mkForce null;
				RootDirectory = lib.mkForce null;
			};

			system.stateVersion = "25.11";
		};
	};
}