mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
Compare commits
4 commits
914334a555
...
3e157ed480
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e157ed480 | |||
| 9594c6f928 | |||
| e5556c99a1 | |||
| 7a31516be1 |
2 changed files with 16 additions and 30 deletions
|
|
@ -1,7 +1,12 @@
|
||||||
{ pkgs, config, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
hostname = "violet";
|
hostname = "violet";
|
||||||
repo = "ssh://dandelion.booping.local:${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,9 +14,10 @@ in
|
||||||
paths = [
|
paths = [
|
||||||
"/home/liv/MinecraftDocker"
|
"/home/liv/MinecraftDocker"
|
||||||
];
|
];
|
||||||
repo = "${repo}/MinecraftDocker-tulip";
|
repo = "${baseRepo}/MinecraftDocker-tulip";
|
||||||
compression = "auto,zstd";
|
encryption.mode = "none";
|
||||||
startAt = "daily";
|
compression = "auto,zstd,10";
|
||||||
|
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"
|
||||||
|
|
@ -19,12 +25,14 @@ 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";
|
||||||
compression = "auto,zstd";
|
compression = "auto,zstd";
|
||||||
startAt = "daily";
|
startAt = "daily";
|
||||||
postHook = ''
|
postHook = ''
|
||||||
|
|
@ -34,30 +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}";
|
||||||
};
|
};
|
||||||
# "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
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
imports =
|
imports =
|
||||||
[ (import ./invidious.nix) ]
|
[ (import ./invidious.nix) ]
|
||||||
++ [ (import ./anubis.nix) ]
|
++ [ (import ./anubis.nix) ]
|
||||||
|
++ [ (import ./borg.nix) ]
|
||||||
++ [ (import ./binternet-proxy.nix) ]
|
++ [ (import ./binternet-proxy.nix) ]
|
||||||
++ [ (import ./docker.nix) ]
|
++ [ (import ./docker.nix) ]
|
||||||
++ [ (import ./frp.nix) ]
|
++ [ (import ./frp.nix) ]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue