Skip to content

Commit

Permalink
fix: disable gauge check service
Browse files Browse the repository at this point in the history
  • Loading branch information
icecreammatt committed Feb 11, 2024
1 parent 8699e94 commit 964f097
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions hosts/nixos/mini/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,30 +95,30 @@
};
};

systemd.timers."gauge-check" = {
wantedBy = ["timers.target"];
timerConfig = {
OnBootSec = "1m";
OnUnitActiveSec = "1m";
Unit = "gauge-check.service";
};
};

systemd.services."gauge-check" = {
script = ''
TARGET_NAME="/mnt/storage/webroot/pool/pressure-$(date +"%Y%m%d_%H%M%S.%N").jpg"
${pkgs.openssh}/bin/ssh -i /home/matt/.ssh/webcam [email protected] fswebcam -r 1280x1024 --jpeg 90 -D 1 web-cam-shot.jpg
${pkgs.openssh}/bin/scp -i /home/matt/.ssh/webcam [email protected]:web-cam-shot.jpg $TARGET_NAME
${pkgs.uutils-coreutils-noprefix}/bin/ln -f $TARGET_NAME /mnt/storage/webroot/pool/_latest.jpg
${pkgs.imagemagick}/bin/convert /mnt/storage/webroot/pool/_latest.jpg -gravity center -crop 100x100+190+110 +repage /mnt/storage/webroot/pool/_cropped.jpg
${pkgs.imagemagick}/bin/convert /mnt/storage/webroot/pool/_cropped.jpg -resize 900 -sigmoidal-contrast 30x50% -colorspace Gray /mnt/storage/webroot/pool/_zoomed.jpg
'';
# systemd.timers."gauge-check" = {
# wantedBy = ["timers.target"];
# timerConfig = {
# OnBootSec = "1m";
# OnUnitActiveSec = "1m";
# Unit = "gauge-check.service";
# };
# };

serviceConfig = {
Type = "oneshot";
User = "root";
};
};
# systemd.services."gauge-check" = {
# script = ''
# TARGET_NAME="/mnt/storage/webroot/pool/pressure-$(date +"%Y%m%d_%H%M%S.%N").jpg"
# ${pkgs.openssh}/bin/ssh -i /home/matt/.ssh/webcam [email protected] fswebcam -r 1280x1024 --jpeg 90 -D 1 web-cam-shot.jpg
# ${pkgs.openssh}/bin/scp -i /home/matt/.ssh/webcam [email protected]:web-cam-shot.jpg $TARGET_NAME
# ${pkgs.uutils-coreutils-noprefix}/bin/ln -f $TARGET_NAME /mnt/storage/webroot/pool/_latest.jpg
# ${pkgs.imagemagick}/bin/convert /mnt/storage/webroot/pool/_latest.jpg -gravity center -crop 100x100+190+110 +repage /mnt/storage/webroot/pool/_cropped.jpg
# ${pkgs.imagemagick}/bin/convert /mnt/storage/webroot/pool/_cropped.jpg -resize 900 -sigmoidal-contrast 30x50% -colorspace Gray /mnt/storage/webroot/pool/_zoomed.jpg
# '';

# serviceConfig = {
# Type = "oneshot";
# User = "root";
# };
# };

systemd.timers."vaultwarden-backup" = {
wantedBy = ["timers.target"];
Expand Down

0 comments on commit 964f097

Please sign in to comment.