mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 09:44:08 -05:00
Note backup service
This commit is contained in:
parent
047fd93023
commit
2b034f3321
1 changed files with 22 additions and 0 deletions
|
|
@ -5,5 +5,27 @@
|
|||
extraGroups = [ "wheel" "networkmanager" "audio" ];
|
||||
};
|
||||
|
||||
config.systemd.services.note_sync = {
|
||||
enable = true;
|
||||
description = "Auto sync notes to remote";
|
||||
unitConfig = {
|
||||
User = "crow";
|
||||
Group = "crow";
|
||||
Type = "oneshot";
|
||||
};
|
||||
script = "cd /home/crow/Notes\ngit add .\ngit commit -am 'automatic backup'\ngit push";
|
||||
};
|
||||
config.systemd.timers.note_sync = {
|
||||
enable = true;
|
||||
description = "Timer to autosync notes";
|
||||
timerConfig = {
|
||||
OnCalendar = "*:0/5";
|
||||
Persistent = true;
|
||||
};
|
||||
wantedBy = [
|
||||
timers.target
|
||||
];
|
||||
};
|
||||
|
||||
config.home-manager.users.crow = lib.mkIf config.users.crow.home.enable ./home.nix;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue