mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +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
|
let
|
||||||
hostname = "violet";
|
hostname = "violet";
|
||||||
repo = "ssh://dandelion:${toString config.services.openssh.ports}/spinners/rootvol/backups/${hostname}";
|
baseRepo = "ssh://liv@dandelion:9123/spinners/rootvol/backups/${hostname}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.borgbackup.jobs = {
|
services.borgbackup.jobs = {
|
||||||
|
|
@ -9,10 +14,10 @@ in
|
||||||
paths = [
|
paths = [
|
||||||
"/home/liv/MinecraftDocker"
|
"/home/liv/MinecraftDocker"
|
||||||
];
|
];
|
||||||
repo = "${repo}/MinecraftDocker-tulip";
|
repo = "${baseRepo}/MinecraftDocker-tulip";
|
||||||
encryption.mode = "none";
|
encryption.mode = "none";
|
||||||
compression = "auto,zstd";
|
compression = "auto,zstd,10";
|
||||||
startAt = "daily";
|
startAt = [ "3:00" ];
|
||||||
postHook = ''
|
postHook = ''
|
||||||
if [ $exitStatus -eq 2 ]; then
|
if [ $exitStatus -eq 2 ]; then
|
||||||
${pkgs.ntfy-sh}/bin/ntfy send https://ntfy.liv.town/${hostname} "borgbackup: ${hostname} backup (violet-minecraft) failed with errors"
|
${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"
|
${pkgs.ntfy-sh}/bin/ntfy send https://ntfy.liv.town/${hostname} "borgbackup: ${hostname} backup (violet-minecraft) completed succesfully with exit status $exitStatus"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
user = "${username}";
|
||||||
};
|
};
|
||||||
"violet-lib" = {
|
"violet-lib" = {
|
||||||
paths = [
|
paths = [
|
||||||
"/var/lib"
|
"/var/lib"
|
||||||
];
|
];
|
||||||
repo = "${repo}/var-lib";
|
repo = "${baseRepo}/var-lib";
|
||||||
encryption.mode = "none";
|
encryption.mode = "none";
|
||||||
compression = "auto,zstd";
|
compression = "auto,zstd";
|
||||||
startAt = "daily";
|
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"
|
${pkgs.ntfy-sh}/bin/ntfy send https://ntfy.liv.town/${hostname} "borgbackup: ${hostname} backup (violet-lib) completed succesfully with exit status $exitStatus"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
user = "${username}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue