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:
Danilo Reyes
2025-11-11 16:46:28 -06:00
parent 73ae1787d1
commit 578b9d316a

View File

@@ -73,6 +73,12 @@ in
description = "Path on VPS where reports should be synced"; 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 { sshKeyFile = lib.mkOption {
type = lib.types.nullOr lib.types.str; type = lib.types.nullOr lib.types.str;
default = null; default = null;
@@ -151,7 +157,8 @@ in
# Use SSH options with rsync (use full path to ssh) # Use SSH options with rsync (use full path to ssh)
${pkgs.rsync}/bin/rsync -avz --delete \ ${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.reportDir}/ \
${config.services.lidarr-mb-gap.vpsHost}:${config.services.lidarr-mb-gap.vpsPath}/ ${config.services.lidarr-mb-gap.vpsHost}:${config.services.lidarr-mb-gap.vpsPath}/
'' ''