2024-05-06 14:32:00 -05:00
|
|
|
{ pkgs, ... }:
|
|
|
|
let
|
2024-02-21 14:26:47 -06:00
|
|
|
notes-git = ''${pkgs.git}/bin/git -C /home/daylin/stuff/notes'';
|
2024-05-06 14:32:00 -05:00
|
|
|
in
|
|
|
|
{
|
2024-08-11 08:29:46 -05:00
|
|
|
services.restic.backups.gdrive = {
|
|
|
|
user = "daylin";
|
|
|
|
repository = "rclone:g:archives/othalan";
|
|
|
|
passwordFile = "/home/daylin/.config/restic/othalan-pass";
|
|
|
|
paths = [
|
|
|
|
"/home/daylin/stuff/"
|
|
|
|
"/home/daylin/dev/"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-02-21 14:26:47 -06:00
|
|
|
systemd.services.notes-bot = {
|
|
|
|
description = "auto commit changes to notes";
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
|
|
|
User = "daylin";
|
2024-02-22 13:39:26 -06:00
|
|
|
ExecStart = ''
|
|
|
|
${pkgs.bash}/bin/bash -c '${notes-git} commit -m ":memo: :robot: $(${pkgs.coreutils}/bin/date +\'%%T\')" --no-gpg-sign -- notes'
|
|
|
|
'';
|
2024-02-21 14:26:47 -06:00
|
|
|
};
|
|
|
|
};
|
|
|
|
systemd.timers.notes-bot-timer = {
|
|
|
|
description = "run notes commit service";
|
2024-05-06 14:32:00 -05:00
|
|
|
wantedBy = [ "timers.target" ];
|
2024-02-21 14:26:47 -06:00
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "daily";
|
|
|
|
Persistent = true;
|
|
|
|
Unit = "notes-bot.service";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|