type = attrsOf (submodule {
options = {
keep = mkOption { type = int; description = "Number of backups to keep"; };
+ check_command = mkOption { type = str; description = "command to check if backup needs to be done"; default = "backup"; };
login = mkOption { type = str; description = "Login to connect to host"; };
port = mkOption { type = str; default = "22"; description = "Port to connect to host"; };
host = mkOption { type = str; description = "Host to connect to"; };
Number of backups to keep
'';
};
+ check_command = lib.mkOption {
+ type = lib.types.str;
+ default = "backup";
+ description = ''
+ command to check if backup needs to be done
+ '';
+ };
login = lib.mkOption {
type = lib.types.str;
description = ''
-o CheckHostIP=no \
-p $PORT \
-i ${ssh_key} \
- $DEST backup; then
+ $DEST ${profile.check_command}; then
echo "Fichier de verrouillage backup sur $DEST ou impossible de se connecter" >&2
skip=$DEST
fi