backups: refactor and add renoir
This commit is contained in:
parent
e729d38637
commit
c7ec1a5423
3 changed files with 42 additions and 38 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{ self, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./backups.nix
|
||||
./machines.nix
|
||||
./monitoring.nix
|
||||
./network.nix
|
||||
|
|
@ -89,32 +90,6 @@
|
|||
roles.default.tags.all = { };
|
||||
};
|
||||
|
||||
clan.inventory.instances."borgbackup-storagebox" = {
|
||||
module.input = "clan-core";
|
||||
module.name = "borgbackup";
|
||||
|
||||
roles.client.machines = lib.genAttrs [ "crocus" "genepi" "verbena" ] (
|
||||
machine:
|
||||
let
|
||||
config = self.nixosConfigurations.${machine}.config;
|
||||
user = "u422292";
|
||||
host = "${user}.your-storagebox.de";
|
||||
in
|
||||
{
|
||||
settings.destinations."storagebox-${config.networking.hostName}" = {
|
||||
repo = "${user}@${host}:./borgbackup/${config.networking.hostName}";
|
||||
rsh = "ssh -oPort=23 -i ${
|
||||
config.clan.core.vars.generators.borgbackup.files."borgbackup.ssh".path
|
||||
} -oStrictHostKeyChecking=accept-new";
|
||||
};
|
||||
}
|
||||
);
|
||||
roles.client.extraModules = [
|
||||
self.nixosModules.storagebox
|
||||
];
|
||||
roles.server.machines = { };
|
||||
};
|
||||
|
||||
clan.inventory.instances.syncthing = {
|
||||
roles.peer.tags.syncthing = { };
|
||||
roles.peer.settings.folders = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue