1
0
Fork 0
nixos-config/home-manager/roles/fetch-banking-timer.nix
2022-06-03 19:00:32 +02:00

21 lines
556 B
Nix

{pkgs, ...}: {
systemd.user = {
services.fetch-banking = {
Unit.Description = "Fetch banking";
Service = {
Type = "oneshot";
ExecStart = toString (
pkgs.writeShellScript "fetch-banking" ''
cd ~/git/buchhaltung
exec ${pkgs.nix}/bin/nix develop -c ${pkgs.nix}/bin/nix run ".#autoupdate"
''
);
};
};
timers.fetch-banking = {
Unit.Description = "Fetch banking";
Timer.OnCalendar = "22:00";
Install.WantedBy = ["timers.target"];
};
};
}