Add backup home service and timer
This commit is contained in:
parent
5f48a0ab51
commit
03cbf084e0
@ -18,6 +18,7 @@
|
|||||||
./packages
|
./packages
|
||||||
./hyprland
|
./hyprland
|
||||||
./ssh
|
./ssh
|
||||||
|
./services/backup-home.nix
|
||||||
];
|
];
|
||||||
firefox.enable = true;
|
firefox.enable = true;
|
||||||
tmux.enable = true;
|
tmux.enable = true;
|
||||||
|
25
home/services/backup-home.nix
Normal file
25
home/services/backup-home.nix
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
systemd.user.services.backup-home = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Backup home directory";
|
||||||
|
After = [ "network.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "/home/torjus/.local/bin/backup-home";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.timers.backup-home = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Backup home directory";
|
||||||
|
After = [ "network.target" ];
|
||||||
|
};
|
||||||
|
Timer = {
|
||||||
|
OnCalendar = "*-*-* 00:00:00";
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user