Restic: made modular backup declerations.
Required tree-wide re-wiring of the host option. Now, rather than each host having a monolithic restic.nix file, the hosts restic.nix file just specifies the password and url of the restic repository. Eatch module then definies specific paths to backup and any pre and post commands that need to be performed. Each backed up service gets an independent systemd backup service and timer.
This commit is contained in:
parent
cf33c036dd
commit
48c60629ab
36 changed files with 307 additions and 1476 deletions
|
@ -1,6 +1,4 @@
|
|||
{lib}: let
|
||||
net = import ./net.nix {inherit lib;};
|
||||
in {
|
||||
{lib}: {
|
||||
dirToStrings = dir: (map (v: builtins.readFile "${dir}/${v}")
|
||||
(builtins.filter (v:
|
||||
(builtins.readFileType "${dir}/${v}") == "regular") (
|
||||
|
@ -11,13 +9,4 @@ in {
|
|||
)
|
||||
else []
|
||||
)));
|
||||
|
||||
calcSystemdDhcpPoolOffset = {
|
||||
base,
|
||||
start,
|
||||
end,
|
||||
}: {
|
||||
offset = net.lib.net.ip.diff start base;
|
||||
size = net.lib.net.ip.diff end start;
|
||||
};
|
||||
}
|
||||
|
|
1269
lib/net.nix
1269
lib/net.nix
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue