mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-03-20 08:22:55 +01:00
Compare commits
No commits in common. "3e157ed48074af27af8839dae1c31e2fe5f5a9a2" and "914334a55565c14475a58613b282088a70d3913a" have entirely different histories.
3e157ed480
...
914334a555
2 changed files with 30 additions and 16 deletions
|
|
@ -1,12 +1,7 @@
|
||||||
{
|
{ pkgs, config, ... }:
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
username,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
hostname = "violet";
|
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
|
in
|
||||||
{
|
{
|
||||||
services.borgbackup.jobs = {
|
services.borgbackup.jobs = {
|
||||||
|
|
@ -14,10 +9,9 @@ in
|
||||||
paths = [
|
paths = [
|
||||||
"/home/liv/MinecraftDocker"
|
"/home/liv/MinecraftDocker"
|
||||||
];
|
];
|
||||||
repo = "${baseRepo}/MinecraftDocker-tulip";
|
repo = "${repo}/MinecraftDocker-tulip";
|
||||||
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"
|
||||||
|
|
@ -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"
|
${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 = "${baseRepo}/var-lib";
|
repo = "${repo}/var-lib";
|
||||||
encryption.mode = "none";
|
|
||||||
compression = "auto,zstd";
|
compression = "auto,zstd";
|
||||||
startAt = "daily";
|
startAt = "daily";
|
||||||
postHook = ''
|
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"
|
${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,7 +3,6 @@
|
||||||
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