feat: more btrbk things
parent
8eb37952f4
commit
e7b0d0ba53
34
capibara.nix
34
capibara.nix
|
@ -6,7 +6,7 @@
|
|||
|
||||
let
|
||||
home = "/home/rilla";
|
||||
run-offline-backups = pkgs.writeScriptBin "run-offline-backups" ''
|
||||
offline-backups = pkgs.writeScriptBin "offline-backups" ''
|
||||
#!${pkgs.dash}/bin/dash
|
||||
|
||||
set -xe
|
||||
|
@ -16,10 +16,10 @@ let
|
|||
done && \
|
||||
/run/wrappers/bin/doas -u btrbk \
|
||||
${pkgs.btrbk}/bin/btrbk \
|
||||
-c /etc/btrbk/offline-backups.conf \
|
||||
--config /etc/btrbk/offline-backups.conf \
|
||||
--progress \
|
||||
--verbose \
|
||||
run
|
||||
"$@"
|
||||
'';
|
||||
|
||||
in {
|
||||
|
@ -163,7 +163,7 @@ in {
|
|||
# services.thermald.enable = true;
|
||||
services.tlp.enable = true;
|
||||
services.power-profiles-daemon.enable = false;
|
||||
environment.systemPackages = with pkgs; [ powertop acpi run-offline-backups ];
|
||||
environment.systemPackages = with pkgs; [ powertop acpi offline-backups ];
|
||||
|
||||
#services.beesd.filesystems = {
|
||||
# root = {
|
||||
|
@ -199,10 +199,15 @@ in {
|
|||
ssh_user = "btrbk";
|
||||
ssh_identity = "/etc/btrbk/id_ed25519";
|
||||
backend_remote = "btrfs-progs-doas";
|
||||
snapshot_create = "onchange";
|
||||
snapshot_preserve_min = "latest";
|
||||
target_preserve_min = "all";
|
||||
volume = {
|
||||
|
||||
"ssh://narwhal:22/mnt/btr_pool" = {
|
||||
snapshot_dir = "btrbk_snapshots";
|
||||
stream_buffer = "50%";
|
||||
stream_compress = "zstd";
|
||||
snapshot_dir = "btrbk_snapshots_offline";
|
||||
subvolume = {
|
||||
backups = { };
|
||||
books = { };
|
||||
|
@ -225,14 +230,14 @@ in {
|
|||
};
|
||||
|
||||
"ssh://suricata:22/mnt/btr_pool" = {
|
||||
snapshot_dir = "btrbk_snapshots";
|
||||
stream_buffer = "50%";
|
||||
snapshot_dir = "btrbk_snapshots_offline";
|
||||
compat_remote = "busybox";
|
||||
subvolume = {
|
||||
home = { };
|
||||
rancher_config = { };
|
||||
backups = { };
|
||||
configs = { };
|
||||
|
||||
};
|
||||
target = {
|
||||
"/mnt/backups/0/btr_backup/suricata" = { };
|
||||
|
@ -240,11 +245,26 @@ in {
|
|||
"/mnt/backups/2/btr_backup/suricata" = { };
|
||||
};
|
||||
};
|
||||
|
||||
"ssh://10.8.8.2:22/mnt/btr_pool" = {
|
||||
stream_buffer = "50%";
|
||||
snapshot_dir = "btrbk_snapshots_offline";
|
||||
compat_remote = "busybox";
|
||||
subvolume = {
|
||||
certs = { };
|
||||
volumes = { };
|
||||
};
|
||||
target = {
|
||||
"/mnt/backups/0/btr_backup/caladan" = { };
|
||||
"/mnt/backups/1/btr_backup/caladan" = { };
|
||||
"/mnt/backups/2/btr_backup/caladan" = { };
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.deviceSection = ''
|
||||
Option "TearFree" "true"
|
||||
|
|
Loading…
Reference in New Issue