stream-dl < chat-dl & picarto-dl

This commit is contained in:
2024-04-03 21:29:01 -06:00
parent c2c7894f16
commit 8a8e9163c5

View File

@@ -49,16 +49,13 @@ let
"tasks" (builtins.readFile ../scripts/tasks.sh); "tasks" (builtins.readFile ../scripts/tasks.sh);
jawzSubs = pkgs.writeScriptBin jawzSubs = pkgs.writeScriptBin
"sub-sync" (builtins.readFile ../scripts/sub-sync.sh); "sub-sync" (builtins.readFile ../scripts/sub-sync.sh);
jawzChat = pkgs.writeScriptBin jawzStream = pkgs.writeScriptBin
"chat-dl" (builtins.readFile ../scripts/chat-dl.sh); "stream-dl" (builtins.readFile ../scripts/stream-dl.sh);
jawzPicarto = pkgs.writeScriptBin
"picarto-dl" (builtins.readFile ../scripts/picarto-dl.sh);
jawzScripts = [ jawzScripts = [
jawzManageLibrary jawzManageLibrary
jawzTasks jawzTasks
jawzSubs jawzSubs
jawzChat jawzStream
jawzPicarto
]; ];
in in
{ # Remember to close this bracket at the end of the document { # Remember to close this bracket at the end of the document
@@ -816,12 +813,7 @@ in [ myPkg ];
# wantedBy = [ "default.target" ]; # wantedBy = [ "default.target" ];
# path = [ # path = [
# pkgs.bash # pkgs.bash
# pkgs.fd # pkgs.nix
# pkgs.ripgrep
# pkgs.file
# pkgs.alass
# pkgs.ffmpeg
# pkgs.gum
# jawzSubs # jawzSubs
# ]; # ];
# serviceConfig = { # serviceConfig = {
@@ -845,8 +837,8 @@ in [ myPkg ];
}; };
user = { user = {
services = let services = let
chatService = channel: { streamService = channel: {
description = "monitors a chaturbate channel for online streams."; description = "monitors a stream channel for online streams.";
restartIfChanged = true; restartIfChanged = true;
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = [ path = [
@@ -856,12 +848,12 @@ in [ myPkg ];
serviceConfig = { serviceConfig = {
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 30; RestartSec = 30;
ExecStart = "${jawzChat}/bin/chat-dl ${channel}"; ExecStart = "${jawzChat}/bin/stream-dl ${channel}";
}; };
}; };
in { in {
"chat@" = { "stream@" = {
description = "monitors a chaturbate channel for online streams."; description = "monitors a stream channel for online streams.";
restartIfChanged = true; restartIfChanged = true;
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = [ path = [
@@ -871,23 +863,12 @@ in [ myPkg ];
serviceConfig = { serviceConfig = {
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 30; RestartSec = 30;
ExecStart = "${jawzChat}/bin/chat-dl %I"; ExecStart = "${jawzChat}/bin/stream-dl %I";
}; };
}; };
"chat-johnneal911" = chatService "johnneal911" // { }; "stream-johnneal911" = streamService "johnneal911" // { };
"chat-uk2011boy" = chatService "uk2011boy" // { }; "stream-uk2011boy" = streamService "uk2011boy" // { };
# HentaiAtHome = { "stream-tomayto\x20picarto" = streamService "tomayto\x20picarto" // { };
# enable = true;
# restartIfChanged = true;
# description = "Run hentai@home server";
# wantedBy = [ "default.target" ];
# serviceConfig = {
# Restart = "on-failure";
# RestartSec = 30;
# WorkingDirectory="/mnt/disks/hnbox";
# ExecStart = "${pkgs.HentaiAtHome}/bin/HentaiAtHome";
# };
# };
# unpackerr = { # unpackerr = {
# enable = true; # enable = true;
# restartIfChanged = true; # restartIfChanged = true;
@@ -946,9 +927,9 @@ in [ myPkg ];
# }; # };
}; };
timers = let timers = let
chatTimer = { streamTimer = {
enable = true; enable = true;
description = "monitors a chaturbate channel for online streams."; description = "monitors a stream channel for online streams.";
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = {
OnBootSec = "5min"; OnBootSec = "5min";
@@ -957,8 +938,9 @@ in [ myPkg ];
}; };
}; };
in { in {
"chat-johnneal911" = chatTimer // { }; "stream-johnneal911" = streamTimer // { };
"chat-uk2011boy" = chatTimer // { }; "stream-uk2011boy" = streamTimer // { };
"stream-tomayto\x20picarto" = streamTimmer // { };
# tasks = { # tasks = {
# enable = true; # enable = true;
# description = "Run a tasks script which keeps a lot of things organized"; # description = "Run a tasks script which keeps a lot of things organized";