borgbackup/server: warning if a machine does not have a secret generated yet.

This commit is contained in:
Jörg Thalheim
2024-07-17 15:10:35 +02:00
parent 5814e9790f
commit d51bf05821

View File

@@ -28,7 +28,13 @@ in
let
fullPath = borgbackupIpMachinePath machine;
in
if builtins.pathExists fullPath then machine else null
if builtins.pathExists fullPath then
machine
else
lib.warn ''
Machine ${machine} does not have a borgbackup key at ${fullPath},
run `clan facts generate ${machine}` to generate it.
'' null
) allClients;
machinesWithKey = lib.filter (x: x != null) machinesMaybeKey;