Compare commits

..

No commits in common. "3e157ed48074af27af8839dae1c31e2fe5f5a9a2" and "914334a55565c14475a58613b282088a70d3913a" have entirely different histories.

2 changed files with 30 additions and 16 deletions

View file

@ -1,12 +1,7 @@
{
pkgs,
config,
username,
...
}:
{ pkgs, config, ... }:
let
hostname = "violet";
baseRepo = "ssh://liv@dandelion:9123/spinners/rootvol/backups/${hostname}";
repo = "ssh://dandelion.booping.local:${toString config.services.openssh.ports}/spinners/rootvol/backups/${hostname}";
in
{
services.borgbackup.jobs = {
@ -14,10 +9,9 @@ in
paths = [
"/home/liv/MinecraftDocker"
];
repo = "${baseRepo}/MinecraftDocker-tulip";
encryption.mode = "none";
compression = "auto,zstd,10";
startAt = [ "3:00" ];
repo = "${repo}/MinecraftDocker-tulip";
compression = "auto,zstd";
startAt = "daily";
postHook = ''
if [ $exitStatus -eq 2 ]; then
${pkgs.ntfy-sh}/bin/ntfy send https://ntfy.liv.town/${hostname} "borgbackup: ${hostname} backup (violet-minecraft) failed with errors"
@ -25,14 +19,12 @@ in
${pkgs.ntfy-sh}/bin/ntfy send https://ntfy.liv.town/${hostname} "borgbackup: ${hostname} backup (violet-minecraft) completed succesfully with exit status $exitStatus"
fi
'';
user = "${username}";
};
"violet-lib" = {
paths = [
"/var/lib"
];
repo = "${baseRepo}/var-lib";
encryption.mode = "none";
repo = "${repo}/var-lib";
compression = "auto,zstd";
startAt = "daily";
postHook = ''
@ -42,7 +34,30 @@ in
${pkgs.ntfy-sh}/bin/ntfy send https://ntfy.liv.town/${hostname} "borgbackup: ${hostname} backup (violet-lib) completed succesfully with exit status $exitStatus"
fi
'';
user = "${username}";
};
# "violet-random" = {
# paths = [
# "/random"
# ];
# exclude = [
# "/random/a"
# "/random/a"
# ];
# encryption = {
# mode = "";
# passCommand = "";
# };
# environment.BORG_RSH = "ssh -i ${config.sops.secrets."ssh_private_key_violet".path}";
# repo = "${repo}/violet/random";
# compression = "auto,zstd";
# startAt = "daily";
# postHook = ''
# if [ $exitStatus -eq 2 ]; then
# ${pkgs.ntfy-sh}/bin/ntfy send https://ntfy.${domain}/nixbox "BorgBackup: nixbox backup failed with errors"
# else
# ${pkgs.ntfy-sh}/bin/ntfy send https://ntfy.${domain}/nixbox "BorgBackup: nixbox backup completed succesfully with exit status $exitStatus"
# fi
# '';
# };
};
}

View file

@ -3,7 +3,6 @@
imports =
[ (import ./invidious.nix) ]
++ [ (import ./anubis.nix) ]
++ [ (import ./borg.nix) ]
++ [ (import ./binternet-proxy.nix) ]
++ [ (import ./docker.nix) ]
++ [ (import ./frp.nix) ]