Skip to content

Commit 775c6bf

Browse files
authored
finish TRaSH guide for SABnzbd (#19)
* finish TRaSH guide for SABnzbd * fix config timing, move wait for api to post config
1 parent 6f4e18f commit 775c6bf

6 files changed

Lines changed: 80 additions & 12 deletions

File tree

modules/arr-common/downloadClients.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
serviceName,
55
}:
66
with lib; let
7-
mkWaitForApiScript = import ./mkWaitForApiScript.nix {inherit lib pkgs;};
87
capitalizedName = lib.toUpper (builtins.substring 0 1 serviceName) + builtins.substring 1 (-1) serviceName;
98
in {
109
options = mkOption {
@@ -61,7 +60,6 @@ in {
6160
serviceConfig = {
6261
Type = "oneshot";
6362
RemainAfterExit = true;
64-
ExecStartPre = mkWaitForApiScript serviceName serviceConfig;
6563
};
6664

6765
script = ''

modules/arr-common/hostConfig.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ in {
2222
Type = "oneshot";
2323
RemainAfterExit = true;
2424
ExecStartPre = mkWaitForApiScript serviceName serviceConfig;
25+
ExecStartPost = mkWaitForApiScript serviceName serviceConfig;
2526
};
2627

2728
script = ''

modules/arr-common/rootFolders.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
serviceName,
55
}:
66
with lib; let
7-
mkWaitForApiScript = import ./mkWaitForApiScript.nix {inherit lib pkgs;};
87
capitalizedName = lib.toUpper (builtins.substring 0 1 serviceName) + builtins.substring 1 (-1) serviceName;
98
in {
109
options = mkOption {
@@ -28,7 +27,6 @@ in {
2827
serviceConfig = {
2928
Type = "oneshot";
3029
RemainAfterExit = true;
31-
ExecStartPre = mkWaitForApiScript serviceName serviceConfig;
3230
};
3331

3432
script = ''

modules/prowlarr/applications.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
serviceName,
55
}:
66
with lib; let
7-
mkWaitForApiScript = import ../arr-common/mkWaitForApiScript.nix {inherit lib pkgs;};
87
capitalizedName = lib.toUpper (builtins.substring 0 1 serviceName) + builtins.substring 1 (-1) serviceName;
98
in {
109
type = mkOption {
@@ -47,7 +46,6 @@ in {
4746
serviceConfig = {
4847
Type = "oneshot";
4948
RemainAfterExit = true;
50-
ExecStartPre = mkWaitForApiScript serviceName serviceConfig;
5149
};
5250

5351
script = ''

modules/prowlarr/indexers.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
serviceName,
55
}:
66
with lib; let
7-
mkWaitForApiScript = import ../arr-common/mkWaitForApiScript.nix {inherit lib pkgs;};
87
capitalizedName = lib.toUpper (builtins.substring 0 1 serviceName) + builtins.substring 1 (-1) serviceName;
98
in {
109
type = mkOption {
@@ -42,7 +41,6 @@ in {
4241
serviceConfig = {
4342
Type = "oneshot";
4443
RemainAfterExit = true;
45-
ExecStartPre = mkWaitForApiScript serviceName serviceConfig;
4644
};
4745

4846
script = ''

modules/sabnzbd/settingsType.nix

Lines changed: 79 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,19 @@ in
152152

153153
permissions = mkOption {
154154
type = types.str;
155-
default = "755";
155+
default = "775";
156156
description = "File permissions for downloaded files";
157157
};
158158

159+
propagation_delay = mkOption {
160+
type = types.int;
161+
default = 0;
162+
description = ''
163+
Posts will be pause until they are at least this age.
164+
Setting job priority to Force will skip the delay.
165+
'';
166+
};
167+
159168
download_dir = mkOption {
160169
type = types.str;
161170
default = "${cfg.downloadsDir}/incomplete";
@@ -206,7 +215,7 @@ in
206215

207216
ignore_samples = mkOption {
208217
type = types.bool;
209-
default = true;
218+
default = false;
210219
description = "Ignore sample files";
211220
};
212221

@@ -248,16 +257,82 @@ in
248257

249258
enable_all_par = mkOption {
250259
type = types.bool;
251-
default = true;
260+
default = false;
252261
description = "Download all par2 files";
253262
};
254263

255264
action_on_unwanted_extensions = mkOption {
256265
type = types.int;
257-
default = 2;
266+
default = 1;
258267
description = "Action on unwanted extensions (0=None, 1=Abort, 2=Delete)";
259268
};
260269

270+
no_smart_dupes = mkOption {
271+
type = types.int;
272+
default = 4;
273+
description = "Smart duplicate detection";
274+
};
275+
276+
auto_sort = mkOption {
277+
type = types.str;
278+
default = "";
279+
description = "Automatically sort queue";
280+
};
281+
282+
fail_hopeless_jobs = mkOption {
283+
type = types.bool;
284+
default = true;
285+
description = "Abort jobs that cannot be completed";
286+
};
287+
288+
pause_on_pwrar = mkOption {
289+
type = types.int;
290+
default = 1;
291+
description = "Action when encrypted RAR is downloaded";
292+
};
293+
294+
unwanted_extensions = mkOption {
295+
type = types.str;
296+
default = "";
297+
description = "Unwanted extensions";
298+
};
299+
300+
unwanted_extensions_mode = mkOption {
301+
type = types.int;
302+
default = 0;
303+
description = "Unwanted extension mode (0=Blacklist, 1=Whitelist";
304+
};
305+
306+
safe_postproc = mkOption {
307+
type = types.bool;
308+
default = true;
309+
description = "Post process only verified jobs";
310+
};
311+
312+
sfv_check = mkOption {
313+
type = types.bool;
314+
default = true;
315+
description = "Enable SFV-based checks";
316+
};
317+
318+
enable_recursive = mkOption {
319+
type = types.bool;
320+
default = true;
321+
description = "Enable recursive unpacking";
322+
};
323+
324+
deobfuscate_final_filenames = mkOption {
325+
type = types.bool;
326+
default = true;
327+
description = "Deobfuscate final filenames";
328+
};
329+
330+
flat_unpack = mkOption {
331+
type = types.bool;
332+
default = true;
333+
description = "Ignore any folders inside archives";
334+
};
335+
261336
check_new_rel = mkOption {
262337
type = types.bool;
263338
default = true;

0 commit comments

Comments
 (0)