Migrate borgbackups to private

* Trigger every five minutes.
* Do not query password manager for now.
This commit is contained in:
Daniel Siepmann 2024-06-18 08:39:10 +02:00
parent 9501457107
commit 56a18fe39b
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 2 additions and 92 deletions

View file

@ -11,6 +11,8 @@
./cachix.nix
./web-development
./private/borgbackups.nix
];
# Bootloader.
@ -88,98 +90,6 @@
enable = true;
user = "daniels";
};
borgbackup.jobs = {
# TODO: Add another "systemBackup" job, see: https://discourse.nixos.org/t/nixos-server-what-to-backup/25547/6
projectBackup = {
paths = "/var/projects/";
user = "daniels";
group = "users";
repo = "/run/media/daniels/TimeMachine/Projects";
removableDevice = true;
doInit = false;
exclude = [
"*/node_modules/*"
"*/typo3temp/*"
"*/var/cache/*"
];
prune = {
keep = {
within = "1d";
weekly = 4;
monthly = 2;
};
};
compression = "auto,lzma";
startAt = "8/4:00";
encryption = {
mode = "repokey";
passCommand = "${pkgs.libsecret}/bin/secret-tool lookup password borgbackup.timemachine.projects";
};
environment = {
DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/user/1000/bus";
};
};
danielsHomeBackup = {
paths = "/home/daniels/";
user = "daniels";
group = "users";
repo = "/run/media/daniels/TimeMachine/DanielsHome";
removableDevice = true;
doInit = false;
exclude = [
"/home/daniels/.cache"
"/home/daniels/.config/chromium"
"/home/daniels/.dbus"
"/home/daniels/.gvfs"
"/home/daniels/.icons"
"/home/daniels/.java"
"/home/daniels/.local/bin"
"/home/daniels/.local/lib"
"/home/daniels/.local/share/vim/"
"/home/daniels/.local/share/icons/"
"/home/daniels/.local/share/mime/"
"/home/daniels/.local/share/containers/"
"/home/daniels/.local/state"
"/home/daniels/.mozilla"
"/home/daniels/.nix-profile/"
"/home/daniels/.node"
"/home/daniels/.npm"
"/home/daniels/.node-gyp"
"/home/daniels/.rnd"
"/home/daniels/Downloads/"
"/home/daniels/Music/"
];
prune = {
keep = {
within = "2d";
weekly = 4;
monthly = 6;
};
};
compression = "auto,lzma";
startAt = "8/4:00";
encryption = {
mode = "repokey";
passCommand = "${pkgs.libsecret}/bin/secret-tool lookup password borgbackup.timemachine.danielsHome";
};
environment = {
DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/user/1000/bus";
};
};
};
};
# Enable sound with pipewire.

Binary file not shown.