borgbackup-static: only print warning if it is actually used
This commit is contained in:
@@ -3,8 +3,6 @@ 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 ];
|
||||||
|
|
||||||
@@ -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.";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user