Back up Knot DNSSEC keystore from ns1 to control via borgbackup
clan borgbackup instance: control serves repos, ns1 backs up its clan.core.state (the KASP keystore at /var/lib/knot) nightly over the mesh with repokey encryption. ns1 maps the control machine name to its ZeroTier address so the borg@control repo resolves. Run `clan vars generate ns1` before deploy to mint the borg keypair.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
domains = import ../../modules/dns/domains.nix;
|
||||
mesh = import ../../modules/mesh-hosts.nix { inherit config lib; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
@@ -11,6 +12,16 @@ in
|
||||
|
||||
clan.core.sops.defaultGroups = [ "admins" ];
|
||||
|
||||
# Knot's state dir holds the non-regenerable DNSSEC key material (KSK/ZSK
|
||||
# private keys in the KASP keystore). Declaring it as clan state makes the
|
||||
# borgbackup client back it up; losing it forces an emergency DS rollover at
|
||||
# the registrar. mode 0700 owned by knot, but borg runs as root so it reads it.
|
||||
clan.core.state.knot.folders = [ "/var/lib/knot" ];
|
||||
|
||||
# The borgbackup repo is addressed as `borg@control`; mesh peers have no name
|
||||
# resolution, so map the control machine name to its ZeroTier mesh address.
|
||||
networking.hosts.${mesh.hosts.control} = [ "control" ];
|
||||
|
||||
# Public IPv6 (matches the ns1 AAAA glue); SLAAC doesn't bring it up here.
|
||||
cnx.staticIPv6 = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user