Skip to content

Commit f7f7a0a

Browse files
committed
update rpi5
1 parent aa7b3cc commit f7f7a0a

File tree

2 files changed

+65
-24
lines changed

2 files changed

+65
-24
lines changed

hosts/services/adguard.nix

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,43 @@
2323
name = "admin";
2424
password = "$2y$05$ZSmxS54ZBjJbtzwRB4ChZ.S8qe7wlgvAQzUdcgKMDx8ki9AWVNBFG";
2525
}];
26+
log = {
27+
max_size = 1024;
28+
max_age = 1;
29+
};
30+
querylog = {
31+
interval = "24h";
32+
enabled = true;
33+
};
34+
filtering = {
35+
rewrites = [
36+
{
37+
domain = "prowlarr.local";
38+
answer = "192.168.0.42";
39+
enabled = true;
40+
}
41+
{
42+
domain = "sonarr.local";
43+
answer = "192.168.0.42";
44+
enabled = true;
45+
}
46+
{
47+
domain = "radarr.local";
48+
answer = "192.168.0.42";
49+
enabled = true;
50+
}
51+
{
52+
domain = "bazarr.local";
53+
answer = "192.168.0.42";
54+
enabled = true;
55+
}
56+
{
57+
domain = "torrent.local";
58+
answer = "192.168.0.42";
59+
enabled = true;
60+
}
61+
];
62+
};
2663
};
2764
};
2865
};

hosts/services/arr/contained.nix

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
local_ip = lib.mkOption { default = "192.168.100.1"; };
1818
host_ip = lib.mkOption { default = "192.168.100.2"; };
1919

20-
mullvad_ip = lib.mkOption { default = "45.129.56.67"; };
20+
mullvad_ip = lib.mkOption { default = "185.204.1.203"; };
21+
mullvad_ip_out = lib.mkOption { default = "10.71.204.239"; };
2122
host_mount = lib.mkOption { default = "/mnt/arr"; };
2223
external_interface =
2324
lib.mkOption { default = "end0"; }; # WARN: remember to set this
@@ -148,31 +149,31 @@
148149
gid = 6969;
149150
};
150151

151-
# qbittorrent
152-
users.users.qbittorrent = {
153-
isSystemUser = true;
154-
description = "User for running qbittorrent";
152+
services.qbittorrent = {
153+
enable = true;
154+
package = pkgs.qbittorrent-nox;
155155
group = config.arr.group;
156+
webuiPort = config.arr.container.torrent_port;
157+
openFirewall = true;
158+
profileDir = config.arr.container.torrent_dir;
159+
extraArgs = [ "--confirm-legal-notice" ];
160+
serverConfig = {
161+
BitTorrent = {
162+
"Session\\AnonymousModeEnabled" = true;
163+
"Session\\GlobalMaxRatio" = 0;
164+
"Session\\Interface" = "wg-mullvad";
165+
"Session\\InterfaceAddress" = config.arr.container.mullvad_ip_out;
166+
"Session\\InterfaceName" = "wg-mullvad";
167+
};
168+
Preferences = {
169+
WebUI = {
170+
Username = "admin";
171+
Password_PBKDF2 = "@ByteArray(FB1GXcS9ElicV6MtPtttow==:rDRk7bG4xKsBCLylLwo4bC/cx8s8joHrll8CP1PrNj7XyBtSwjCTqpNjHaIjXa/xmYag6ySPORInk9bV8h4UaQ==)";
172+
};
173+
};
174+
};
156175
};
157-
158-
systemd.services.qbittorrent = {
159-
after = [ "network.target" ];
160-
description = "Qbittorrent Web";
161-
wantedBy = [ "multi-user.target" ];
162-
path = [ pkgs.qbittorrent-nox ];
163-
serviceConfig = {
164-
ExecStart = ''
165-
${pkgs.qbittorrent-nox}/bin/qbittorrent-nox --webui-port=${
166-
toString config.arr.container.torrent_port
167-
} --profile=${config.arr.container.torrent_dir}
168-
'';
169-
User = "qbittorrent";
170-
Group = config.arr.group;
171-
MemoryMax = "1G";
172-
Restart = "always";
173-
UMask = "0002";
174-
};
175-
};
176+
systemd.services.qbittorrent.serviceConfig.UMask = "0002";
176177

177178
services.prowlarr = {
178179
enable = true;
@@ -185,19 +186,22 @@
185186
openFirewall = true;
186187
dataDir = config.arr.container.radarr_dir;
187188
};
189+
systemd.services.radarr.serviceConfig.UMask = "0002";
188190

189191
services.sonarr = {
190192
enable = true;
191193
group = config.arr.group;
192194
openFirewall = true;
193195
dataDir = config.arr.container.sonarr_dir;
194196
};
197+
systemd.services.sonarr.serviceConfig.UMask = "0002";
195198

196199
services.bazarr = {
197200
enable = true;
198201
group = config.arr.group;
199202
openFirewall = true;
200203
};
204+
systemd.services.bazarr.serviceConfig.UMask = "0002";
201205

202206
services.lidarr = {
203207
enable = false;

0 commit comments

Comments
 (0)