Skip to content

Commit

Permalink
utils: bento systemd timer
Browse files Browse the repository at this point in the history
  • Loading branch information
rapenne-s committed Sep 4, 2022
1 parent 01d9952 commit 4bf4483
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions utils/bento.nix
Original file line number Diff line number Diff line change
@@ -0,0 1,24 @@
{ lib, pkgs, ... }:
let
timer = "*:0/5";
in
{
systemd.timers.bento-upgrade = {
enable = true;
timerConfig = {
OnCalendar = "${timer}";
Unit = "bento-upgrade.service";
};
wantedBy = [ "timers.target" ];
};

systemd.services.bento-upgrade = {
enable = true;
path = with pkgs; [ openssh git nixos-rebuild ];
serviceConfig.Type = "oneshot";
script = ''
cd /var/bento
/bin/sh update.sh
'';
};
}

0 comments on commit 4bf4483

Please sign in to comment.