summaryrefslogtreecommitdiff
path: root/nixos/hosts/apocalypse/backup.nix
diff options
context:
space:
mode:
authorJakub Stachurski <j.stachurski@student.utwente.nl>2025-05-03 21:49:42 +0200
committerJakub Stachurski <j.stachurski@student.utwente.nl>2025-05-03 21:49:42 +0200
commit40f6e567cd1c8bd893d92b40487571847799c647 (patch)
tree72c6e1eb975ca4fa25fd9ac4a1f4116e19772f9f /nixos/hosts/apocalypse/backup.nix
parent57dde93d6059cd476bc5e196e0cef348f6544085 (diff)
firewall
Diffstat (limited to '')
-rw-r--r--nixos/hosts/apocalypse/backup.nix21
1 files changed, 9 insertions, 12 deletions
diff --git a/nixos/hosts/apocalypse/backup.nix b/nixos/hosts/apocalypse/backup.nix
index de22bd3..646ff6c 100644
--- a/nixos/hosts/apocalypse/backup.nix
+++ b/nixos/hosts/apocalypse/backup.nix
@@ -1,28 +1,25 @@
{ config, lib, pkgs, modulesPath, ...}:
{
+ environment.systemPackages = with pkgs; [
+ btrbk
+ lz4
+ ];
+
services.btrbk = {
+ extraPackages = with pkgs; [ lz4 ];
instances."remote_vault" = {
onCalendar = "weekly";
settings = {
- ssh_identity = "/etc/btrbk_key"; # NOTE: must be readable by user/group btrbk
- ssh_user = "vault";
+ ssh_identity = "/etc/vault_key"; # NOTE: must be readable by user/group btrbk
+ ssh_user = "vaultmanager";
stream_compress = "lz4";
volume."/btrfs_root" = {
target = "ssh://10.100.0.1/vault/backups/apocalypse";
subvolume = {
- nixos = {
+ "@root" = {
snapshot_create = "always";
};
};
- # "nixos" could instead be an attribute set with other volumes to
- # back up and to give subvolume specific configuration.
- # See man btrbk.conf for possible options.
- /*
- subvolume = {
- home = { snapshot_create = "always"; };
- nixos = {};
- };
- */
};
};
};