diff options
author | Alex Auvolat <alex@adnab.me> | 2024-04-07 15:27:52 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-04-07 15:27:52 +0200 |
commit | 77d298b4a4bfbe2fd69d368b714d103c1dc7de2f (patch) | |
tree | 2748ea8e15f9519faa9f82de8ddf3f7cf61b9987 | |
parent | 3245786875910992688f9cb7a1c5d02dd34c9323 (diff) | |
download | user-config-77d298b4a4bfbe2fd69d368b714d103c1dc7de2f.tar.gz user-config-77d298b4a4bfbe2fd69d368b714d103c1dc7de2f.zip |
add restic kusanagi
-rw-r--r-- | nixos/kusanagi.nix | 26 | ||||
-rw-r--r-- | nixpkgs/kusanagi.nix | 10 |
2 files changed, 31 insertions, 5 deletions
diff --git a/nixos/kusanagi.nix b/nixos/kusanagi.nix index 1792548..88e3b66 100644 --- a/nixos/kusanagi.nix +++ b/nixos/kusanagi.nix @@ -143,6 +143,32 @@ in virtualisation.docker.enable = true; virtualisation.virtualbox.host.enable = true; + # ---- remote backup (restic to infracoll) + + services.restic.backups."infracoll" = { + repository = "s3:http://garage.isomorphis.me:3900/restic-lx"; + environmentFile = "/persist/etc/secrets/restic/infracoll/credentials"; + passwordFile = "/persist/etc/secrets/restic/infracoll/password"; + paths = [ + "/persist" + "/Z/lx" + ]; + exclude = [ + "/persist/var/log" + "/Z/lx/oneplus5/Camera" # for now + ]; + timerConfig = { + OnCalendar = "21:30"; + Persistent = true; + }; + pruneOpts = [ + "--keep-daily 7" + "--keep-weekly 5" + "--keep-monthly 12" + "--keep-yearly 75" + ]; + }; + # ---- nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; diff --git a/nixpkgs/kusanagi.nix b/nixpkgs/kusanagi.nix index 5508965..19b367d 100644 --- a/nixpkgs/kusanagi.nix +++ b/nixpkgs/kusanagi.nix @@ -23,16 +23,16 @@ in { mklink /Z/lx/app/openssh ~/.ssh mklink /Z/lx/app/pass ~/.password-store mklink /Z/lx/app/thunderbird ~/.thunderbird - mklink /Z/lx/app/cargo ~/.cargo + mklink /Z/lx.nobackup/app/cargo ~/.cargo mklink /Z/lx/app/rclone/rclone.conf ~/.config/rclone/rclone.conf - mklink /Z/lx/app/arduino/Arduino ~/Arduino - mklink /Z/lx/app/arduino/.arduino15 ~/.arduino15 + mklink /Z/lx.nobackup/app/arduino/Arduino ~/Arduino + mklink /Z/lx.nobackup/app/arduino/.arduino15 ~/.arduino15 mklink /Z/lx/app/tagaini "$HOME/.local/share/Tagaini Jisho" mklink /Z/lx/app/anki "$HOME/.local/share/Anki2" - mklink /Z/lx/app/steam/.steam ~/.steam - mklink /Z/lx/app/steam/Steam ~/.local/share/Steam + mklink /Z/lx.nobackup/app/steam/.steam ~/.steam + mklink /Z/lx.nobackup/app/steam/Steam ~/.local/share/Steam mklink /Z/lx/app/element ~/.config/Element mklink /Z/lx/app/dino ~/.local/share/dino |