download & stream-dl units + ryot disabled

This commit is contained in:
2024-06-12 23:59:44 -06:00
parent 1c61865222
commit 17c3d7a98f
6 changed files with 161 additions and 85 deletions

View File

@@ -1,8 +1,4 @@
{ config, lib, pkgs, ... }:
let
stream-dl = pkgs.writeScriptBin "stream-dl"
(builtins.readFile ../../scripts/stream-dl.sh);
in {
{ pkgs, ... }: {
imports =
[ ./servers.nix ./docker.nix ./hardware-configuration.nix ../../base.nix ];
my = {
@@ -15,6 +11,10 @@ in {
python.enable = true;
sh.enable = true;
};
units = {
download.enable = true;
stream-dl.enable = true;
};
scripts = {
run.enable = true;
split-dir.enable = true;
@@ -120,20 +120,8 @@ in {
wantedBy = [ "multi-user.target" ];
};
};
timers = { };
user = {
services = {
"stream@" = {
description = "monitors a stream channel for online streams.";
restartIfChanged = true;
wantedBy = [ "default.target" ];
path = [ pkgs.nix stream-dl ];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart = "${stream-dl}/bin/stream-dl %I";
};
};
# unpackerr = {
# enable = true;
# restartIfChanged = true;
@@ -159,29 +147,11 @@ in {
};
};
};
timers = let
streamTimer = {
enable = true;
description = "monitors a stream channel for online streams.";
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "5min";
OnUnitActiveSec = "65min";
RandomizedDelaySec = 30;
};
};
in {
"stream@johnneal911" = streamTimer // { };
"stream@uk2011boy" = streamTimer // { };
"stream@tommy9x6" = streamTimer // { };
"stream@brocollirob" = streamTimer // { };
"stream@tomayto\\x20picarto" = streamTimer // { };
qbit_manage = {
enable = true;
description = "Tidy up my torrents";
wantedBy = [ "timers.target" ];
timerConfig = { OnCalendar = "*:0/10"; };
};
timers.qbit_manage = {
enable = true;
description = "Tidy up my torrents";
wantedBy = [ "timers.target" ];
timerConfig = { OnCalendar = "*:0/10"; };
};
};
};