add borgbackup

This commit is contained in:
insert 2024-05-04 20:46:51 -04:00
parent 2d0fcbe30a
commit e2b0cf0aaa
Signed by: insert
GPG key ID: A70775C389ACF105
2 changed files with 51 additions and 0 deletions

View file

@ -144,6 +144,11 @@
owner = "insert"; owner = "insert";
group = "users"; group = "users";
}; };
age.secrets.borg = {
file = /home/insert/Documents/nixos/secrets/borg.age;
owner = "insert";
group = "users";
};
#home-manager.users.insert= { pkgs, ... }: { #home-manager.users.insert= { pkgs, ... }: {

View file

@ -44,6 +44,52 @@
package = config.boot.kernelPackages.nvidiaPackages.production; package = config.boot.kernelPackages.nvidiaPackages.production;
}; };
services.borgbackup.jobs.insertpclinux = {
paths = "/home/insert";
encryption.mode = "repokey-blake2";
encryption.passCommand = "cat ${config.age.secrets.borg.path}";
compression = "auto,zstd";
repo = "/mnt/NAS-backup/insertpclinux-insert";
user = "insert";
startAt = "daily";
exclude = [
"^data.img$"
"^.Trash-100$"
"/node.repl_history"
"/.oldprofile"
"/.steampath"
"/mnt"
"/.steampid"
"/.zshenv"
"/.zshrc"
"/.android"
"/.compose-cache"
"/.docker"
"/.gradle"
"/.hyprland"
"/.java"
"/.kube"
"/.minecraft-bta"
"/.mozilla"
"/.nix-defexpr"
"/.nix-profile"
"/.nv"
"/.thunderbird"
"/.zsh"
"/Downloads"
"/.cache"
"/.var/app/*/cache"
"/.local/share/flatpak/repo/"
"/.local/share/Trash"
"/.local/share/libvirt"
"/.local/share/containers"
"/.local/share/flatpak/overrides"
"/.var/app/*/config/cache"
"/.var/app/*/config"
];
};
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
security.pki.certificateFiles = [ security.pki.certificateFiles = [