From 94f8172f0f5a6d5568b5204d88c5d45e77a20f69 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 24 Apr 2022 13:46:18 -0700 Subject: backups: do backups for the laptop From the laptop I only backup /home/fcuny, as the rest should be straightforward to rebuild with nix. I run that backup as my own user, since I need my ssh key to use the remote repository (which is on the NAS). I also need a new secret for it (I might have been able to use `pass' for this, but well, that's easy enough). For the NAS, I update the list of directories to backup to include home, this will be on the systems backup. --- hosts/aptos/services.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 hosts/aptos/services.nix (limited to 'hosts/aptos/services.nix') diff --git a/hosts/aptos/services.nix b/hosts/aptos/services.nix new file mode 100644 index 0000000..a2210e2 --- /dev/null +++ b/hosts/aptos/services.nix @@ -0,0 +1,19 @@ +{ config, ... }: +let secrets = config.age.secrets; +in { + my.services = { + backup = { + enable = true; + user = "fcuny"; + repository = "sftp:192.168.0.107:/data/slow/backups/users/fcuny"; + exclude = [ + "/home/fcuny/.cache" + "/home/fcuny/downloads" + "/home/fcuny/workspace/linux.git" + ]; + timerConfig = { OnCalendar = "06:30"; }; + passwordFile = secrets."restic/repo-users".path; + paths = [ "/home/fcuny" ]; + }; + }; +} -- cgit v1.2.3