Testing forecast weather scripts

This commit is contained in:
2023-05-16 20:12:31 -06:00
parent d1695430b0
commit 900d62a98b
2 changed files with 117 additions and 2 deletions

View File

@@ -50,6 +50,10 @@ let
};
nextcloud_scrapsync = pkgs.writeScriptBin
"nextcloud_scrapsync" (builtins.readFile ./scripts/nextcloud_scrapsync.sh);
mateo-current = pkgs.writeScriptBin
"mateo-current" (builtins.readFile ./scripts/current.sh);
mateo-forecast = pkgs.writeScriptBin
"mateo-forecast" (builtins.readFile ./scripts/forecast.sh);
manage_library = pkgs.writeScriptBin
"manage_library" (builtins.readFile ./scripts/manage_library.fish);
ffmpeg4discord = pkgs.writeScriptBin
@@ -370,6 +374,9 @@ lm_sensors # for extension, displays cpu temp
nextcloud_scrapsync
ffmpeg4discord
manage_library
mateo-current
mateo-forecast
jq
#+end_src
** DEVELOPMENT PACKAGES
@@ -910,12 +917,45 @@ systemd.services = {
];
serviceConfig = {
Restart = "on-failure";
# Type = "simple";
RestartSec = 30;
ExecStart = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} up --remove-orphans";
ExecStop = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} down";
};
};
"mateo-current" = {
enable = true;
restartIfChanged = true;
description = "current weather";
wantedBy = [ "default.target" ];
path = [
pkgs.bash
pkgs.jq
pkgs.curl
mateo-current
];
serviceConfig = {
Restart = "on-failure";
WorkingDirectory="/home/jawz/Development/Scripts/open-mateo";
ExecStart = "${mateo-current}/bin/mateo-current";
};
};
"mateo-forecast" = {
enable = true;
restartIfChanged = true;
description = "forecast weather";
wantedBy = [ "default.target" ];
path = [
pkgs.bash
pkgs.jq
pkgs.curl
mateo-forecast
];
serviceConfig = {
Restart = "on-failure";
WorkingDirectory="/home/jawz/Development/Scripts/open-mateo";
ExecStart = "${mateo-forecast}/bin/mateo-forecast";
};
};
"nextcloud_scrapsync" = {
description = "Sync scrapped files with nextcloud";
wantedBy = [ "default.target" ];
@@ -945,6 +985,30 @@ systemd.timers = {
Persistent = true;
};
};
"mateo-current" = {
enable = true;
description = "Sync scrapped files with nextcloud";
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "1m";
OnUnitActiveSec = "1h";
RandomizedDelaySec = 30;
Persistent = true;
};
};
"mateo-forecast" = {
enable = true;
description = "Sync scrapped files with nextcloud";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar= [
"*-*-* 06:05:00"
"*-*-* 18:05:00"
];
RandomizedDelaySec = 30;
Persistent = true;
};
};
};
systemd.user.services = {
"HentaiAtHome" = {