diff options
author | Franck Cuny <franck@fcuny.net> | 2022-03-05 18:07:42 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-03-05 18:08:20 -0800 |
commit | 48828f7f71d27e0aa3fb083552dc1d67af7661b6 (patch) | |
tree | 2b96eed30a776572617e7891c0a310acddcd0ece /users/fcuny | |
parent | samba: fix path for music, add videos (diff) | |
download | world-48828f7f71d27e0aa3fb083552dc1d67af7661b6.tar.gz |
backups: do the backup over ssh
We're using ssh instead of the rest server, we're also pushing them to a different repo, where I don't need to be root.
Diffstat (limited to '')
-rw-r--r-- | users/fcuny/cli/backups.nix | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/users/fcuny/cli/backups.nix b/users/fcuny/cli/backups.nix index 7edbc59..57bd8b7 100644 --- a/users/fcuny/cli/backups.nix +++ b/users/fcuny/cli/backups.nix @@ -1,9 +1,7 @@ { pkgs, ... }: { - home.packages = with pkgs; [ - restic - ]; + home.packages = with pkgs; [ restic ]; systemd.user.services.backup = { Unit = { @@ -13,11 +11,13 @@ Service = { Type = "oneshot"; Environment = [ - "RESTIC_REPOSITORY=rest:http://192.168.6.10:8010/" - "RESTIC_PASSWORD_COMMAND=\"pass backup/restic@%H\"" + "RESTIC_REPOSITORY=sftp:fcuny@192.168.0.107:/data/slow/backups/users/fcuny" + ''RESTIC_PASSWORD_COMMAND="pass backup/restic@%H"'' ]; - ExecStartPre = "${pkgs.systemd}/lib/systemd/systemd-networkd-wait-online --interface=wg0"; - ExecStart = "${pkgs.restic}/bin/restic --tag=home-nixos --exclude=%h/media --exclude=%C --exclude=%E backup %h"; + ExecStartPre = + "${pkgs.systemd}/lib/systemd/systemd-networkd-wait-online --interface=wg0"; + ExecStart = + "${pkgs.restic}/bin/restic --tag=home-nixos --exclude=%h/media --exclude=%C --exclude=%E backup %h"; }; }; } |