mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 06:50:14 +01:00
chore: update, still doesn't work
This commit is contained in:
parent
7a31516be1
commit
e5556c99a1
1 changed files with 13 additions and 6 deletions
|
|
@ -1,7 +1,12 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hostname = "violet";
|
||||
repo = "ssh://dandelion:${toString config.services.openssh.ports}/spinners/rootvol/backups/${hostname}";
|
||||
baseRepo = "ssh://liv@dandelion:9123/spinners/rootvol/backups/${hostname}";
|
||||
in
|
||||
{
|
||||
services.borgbackup.jobs = {
|
||||
|
|
@ -9,10 +14,10 @@ in
|
|||
paths = [
|
||||
"/home/liv/MinecraftDocker"
|
||||
];
|
||||
repo = "${repo}/MinecraftDocker-tulip";
|
||||
repo = "${baseRepo}/MinecraftDocker-tulip";
|
||||
encryption.mode = "none";
|
||||
compression = "auto,zstd";
|
||||
startAt = "daily";
|
||||
compression = "auto,zstd,10";
|
||||
startAt = [ "3:00" ];
|
||||
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"
|
||||
|
|
@ -20,12 +25,13 @@ 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 = "${repo}/var-lib";
|
||||
repo = "${baseRepo}/var-lib";
|
||||
encryption.mode = "none";
|
||||
compression = "auto,zstd";
|
||||
startAt = "daily";
|
||||
|
|
@ -36,6 +42,7 @@ 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}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue