Fetch banking job
This commit is contained in:
parent
e82545d99e
commit
9a7c4ca64c
|
@ -39,6 +39,7 @@ let
|
|||
};
|
||||
on-my-machines = [
|
||||
./roles/on-my-machine.nix
|
||||
./roles/accounting.nix
|
||||
./roles/mail.nix
|
||||
./roles/kassandra.nix
|
||||
./roles/taskwarrior.nix
|
||||
|
@ -54,7 +55,6 @@ let
|
|||
(import ./roles/firefox.nix "http://localhost:8842")
|
||||
(makeAutostart "kassandra2")
|
||||
(makeAutostart "unlock-ssh")
|
||||
./roles/accounting.nix
|
||||
./roles/beets.nix
|
||||
./roles/daily-driver-programs.nix
|
||||
./roles/desktop-items.nix
|
||||
|
@ -102,6 +102,7 @@ in
|
|||
];
|
||||
hera = {
|
||||
default = makeConfig "hera" (on-my-machines ++ [
|
||||
./roles/fetch-banking-timer.nix
|
||||
./roles/weechat
|
||||
./roles/mail2rss.nix
|
||||
./roles/headless-mpd.nix
|
||||
|
|
28
home-manager/roles/fetch-banking-timer.nix
Normal file
28
home-manager/roles/fetch-banking-timer.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ pkgs, ... }: {
|
||||
systemd.user = {
|
||||
services.fetch-banking = {
|
||||
Unit.Description = "Fetch banking";
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = toString (
|
||||
pkgs.writeShellScript "fetch-banking" ''
|
||||
set -e
|
||||
cd ~/git/buchhaltung
|
||||
git pull
|
||||
shake fetch
|
||||
if [[ "$(git status --porcelain */raw)" != "" ]]; then
|
||||
git add */raw
|
||||
git commit -m "Load transactions and balances"
|
||||
git push
|
||||
fi
|
||||
''
|
||||
);
|
||||
};
|
||||
};
|
||||
timers.fetch-banking = {
|
||||
Unit.Description = "Fetch banking";
|
||||
Timer.OnCalendar = "hourly";
|
||||
Install.WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue