Add vpsPort option to lidarr-mb-gap NixOS module
- Introduced a new configuration option `vpsPort` to specify the SSH port for VPS connections, defaulting to 22. - Updated the rsync command to utilize the new `vpsPort` option for improved flexibility in SSH configurations.
This commit is contained in:
@@ -73,6 +73,12 @@ in
|
||||
description = "Path on VPS where reports should be synced";
|
||||
};
|
||||
|
||||
vpsPort = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 22;
|
||||
description = "SSH port for VPS connection";
|
||||
};
|
||||
|
||||
sshKeyFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
@@ -151,7 +157,8 @@ in
|
||||
|
||||
# Use SSH options with rsync (use full path to ssh)
|
||||
${pkgs.rsync}/bin/rsync -avz --delete \
|
||||
-e "${pkgs.openssh}/bin/ssh $SSH_OPTS -o StrictHostKeyChecking=yes" \
|
||||
-e "${pkgs.openssh}/bin/ssh $SSH_OPTS -p ${toString config.services.lidarr-mb-gap.vpsPort} -o \
|
||||
StrictHostKeyChecking=yes" \
|
||||
${config.services.lidarr-mb-gap.reportDir}/ \
|
||||
${config.services.lidarr-mb-gap.vpsHost}:${config.services.lidarr-mb-gap.vpsPath}/
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user