borgbackup-static: only print warning if it is actually used

This commit is contained in:
Jörg Thalheim
2024-09-15 17:26:14 +02:00
parent 2965ecf917
commit 9a5ad4d381

View File

@@ -3,8 +3,6 @@ let
clanDir = config.clan.core.clanDir;
machineDir = clanDir + "/machines/";
in
lib.warn
"The borgbackup-static module is deprecated use the service via the inventory interface instead."
{
imports = [ ../borgbackup ];
@@ -100,4 +98,7 @@ lib.warn
'';
}
];
config.warnings = lib.optional (
builtins.length config.clan.borgbackup-static.targets > 0
) "The borgbackup-static module is deprecated use the service via the inventory interface instead.";
}