Merge pull request 'borgbackup-static: only print warning if it is actually used' (#2112) from borgbackup into main

This commit is contained in:
clan-bot
2024-09-15 15:34:49 +00:00

View File

@@ -3,9 +3,7 @@ let
clanDir = config.clan.core.clanDir; clanDir = config.clan.core.clanDir;
machineDir = clanDir + "/machines/"; machineDir = clanDir + "/machines/";
in in
lib.warn {
"The borgbackup-static module is deprecated use the service via the inventory interface instead."
{
imports = [ ../borgbackup ]; imports = [ ../borgbackup ];
options.clan.borgbackup-static = { options.clan.borgbackup-static = {
@@ -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.";
}