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:
@@ -72,7 +72,13 @@ in
|
|||||||
default = "/var/www/html";
|
default = "/var/www/html";
|
||||||
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}/
|
||||||
''
|
''
|
||||||
|
|||||||
Reference in New Issue
Block a user