systemd download/instagram + linting

This commit is contained in:
Danilo Reyes 2024-04-17 09:56:54 -06:00
parent fd25c9ad1c
commit 27c700767c

View File

@ -404,16 +404,16 @@ Libraries & apps not found on the nix-store and scripts made by me.
#+begin_src nix #+begin_src nix
]) ++ (with pkgs.python3Packages; [ ]) ++ (with pkgs.python3Packages; [
(buildPythonApplication rec { (buildPythonApplication rec {
pname = "download"; pname = "download";
version = "1.5"; version = "2.5";
src = ../scripts/download/.; src = ../scripts/download/.;
doCheck = false; doCheck = false;
buildInputs = [ setuptools ]; buildInputs = [ setuptools ];
propagatedBuildInputs = propagatedBuildInputs =
[ pyyaml types-pyyaml ]; [ pyyaml types-pyyaml ];
}) })
(buildPythonApplication rec { (buildPythonApplication rec {
pname = "ffpb"; pname = "ffpb";
version = "0.4.1"; version = "0.4.1";
src = fetchPypi { src = fetchPypi {
@ -423,8 +423,8 @@ Libraries & apps not found on the nix-store and scripts made by me.
doCheck = false; doCheck = false;
buildInputs = [ setuptools ]; buildInputs = [ setuptools ];
propagatedBuildInputs = propagatedBuildInputs =
[ tqdm ]; [ tqdm ];
}) })
# (buildPythonApplication rec { # (buildPythonApplication rec {
# pname = "qbit_manage"; # pname = "qbit_manage";
# version = "4.0.3"; # version = "4.0.3";
@ -806,7 +806,7 @@ in [ myPkg ];
services = { services = {
"stream@" = { "stream@" = {
description = "monitors a stream channel for online streams."; description = "monitors a stream channel for online streams.";
restartIfChanged = true; restartIfChanged = true;
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = [ path = [
pkgs.nix pkgs.nix
@ -818,6 +818,37 @@ in [ myPkg ];
ExecStart = "${jawzStream}/bin/stream-dl %I"; ExecStart = "${jawzStream}/bin/stream-dl %I";
}; };
}; };
"download@" = {
description = "Downloads post from multiple sources.";
restartIfChanged = true;
wantedBy = [ "default.target" ];
path = [
pkgs.bash
unstable.pkgs.gallery-dl
unstable.pkgs.yt-dlp
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart = "/etc/profiles/per-user/jawz/bin/download %I";
};
};
"instagram@" = {
description = "Downloads post types from instagram.";
restartIfChanged = true;
wantedBy = [ "default.target" ];
path = [
pkgs.bash
unstable.pkgs.gallery-dl
unstable.pkgs.yt-dlp
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart = "/etc/profiles/per-user/jawz/bin/download \\
instagram -u jawz -t %I";
};
};
# unpackerr = { # unpackerr = {
# enable = true; # enable = true;
# restartIfChanged = true; # restartIfChanged = true;
@ -829,6 +860,24 @@ in [ myPkg ];
# ExecStart = "${pkgs.unpackerr}/bin/unpackerr -c /home/jawz/.config/unpackerr.conf"; # ExecStart = "${pkgs.unpackerr}/bin/unpackerr -c /home/jawz/.config/unpackerr.conf";
# }; # };
# }; # };
tuhmayto = {
enable = true;
restartIfChanged = true;
description = "Downloads tuhmayto stuff";
wantedBy = [ "default.target" ];
path = [
pkgs.bash
unstable.pkgs.gallery-dl
unstable.pkgs.yt-dlp
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart = "/etc/profiles/per-user/jawz/bin/download \\
-u jawz -i https://twitter.com/tuhmayto/media \\
https://www.furaffinity.net/user/tuhmayto/";
};
};
manage-library = { manage-library = {
enable = true; enable = true;
restartIfChanged = true; restartIfChanged = true;
@ -836,6 +885,7 @@ in [ myPkg ];
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = [ path = [
pkgs.nix pkgs.nix
pkgs.sudo
jawzManageLibrary jawzManageLibrary
]; ];
serviceConfig = { serviceConfig = {
@ -844,20 +894,6 @@ in [ myPkg ];
ExecStart = "${jawzManageLibrary}/bin/manage-library"; ExecStart = "${jawzManageLibrary}/bin/manage-library";
}; };
}; };
tasks = {
restartIfChanged = true;
description = "Run a tasks script which keeps a lot of things organized";
wantedBy = [ "default.target" ];
path = [
pkgs.nix
jawzTasks
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart = "${jawzTasks}/bin/tasks";
};
};
qbit_manage = let qbit_dir = "/home/jawz/Development/Git/qbit_manage"; in { qbit_manage = let qbit_dir = "/home/jawz/Development/Git/qbit_manage"; in {
restartIfChanged = true; restartIfChanged = true;
description = "Tidy up my torrents"; description = "Tidy up my torrents";
@ -884,15 +920,41 @@ in [ myPkg ];
RandomizedDelaySec = 30; RandomizedDelaySec = 30;
}; };
}; };
downloadTimer = time : {
enable = true;
description = "Downloads post from multiple sources.";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = time;
RandomizedDelaySec = 30;
Persistent = true;
};
};
instagramTimer = time : {
enable = true;
description = "Downloads post types from instagram.";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = time;
RandomizedDelaySec = 120;
Persistent = true;
};
};
in { in {
"stream@johnneal911" = streamTimer // { }; "stream@johnneal911" = streamTimer // { };
"stream@uk2011boy" = streamTimer // { }; "stream@uk2011boy" = streamTimer // { };
"stream@tommy9x6" = streamTimer // { }; "stream@tommy9x6" = streamTimer // { };
"stream@brocollirob" = streamTimer // { }; "stream@brocollirob" = streamTimer // { };
"stream@tomayto\\x20picarto" = streamTimer // { }; "stream@tomayto\\x20picarto" = streamTimer // { };
tasks = { "instagram@stories" = instagramTimer "*-*-* 08:12:00" // { };
"download@main" = downloadTimer "*-*-* 06,18:02:00" // { };
"download@push" = downloadTimer "*:0/5" // { };
"download@manga" = downloadTimer "Fri *-*-* 03:08:00" // { };
# "download@kemono" = downloadTimer
# "*-*-1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 18:06:00" // { };
tuhmayto = {
enable = true; enable = true;
description = "Run a tasks script which keeps a lot of things organized"; description = "Downloads tuhmayto stuff";
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = {
OnCalendar = "*:0/10"; OnCalendar = "*:0/10";