From 842748cc1721135aea1322ff423a234d5001716c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 17 Jul 2024 15:10:35 +0200 Subject: [PATCH] borgbackup/server: warning if a machine does not have a secret generated yet. --- clanModules/borgbackup/roles/server.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/clanModules/borgbackup/roles/server.nix b/clanModules/borgbackup/roles/server.nix index 48c7089c3..2e37cf032 100644 --- a/clanModules/borgbackup/roles/server.nix +++ b/clanModules/borgbackup/roles/server.nix @@ -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;