From 578b9d316aee2f5cfa8b30b49cb6ccbc88ba02b2 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Tue, 11 Nov 2025 16:46:28 -0600 Subject: [PATCH] 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. --- nixos/lidarr-mb-gap.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nixos/lidarr-mb-gap.nix b/nixos/lidarr-mb-gap.nix index 79c22df..16f7784 100644 --- a/nixos/lidarr-mb-gap.nix +++ b/nixos/lidarr-mb-gap.nix @@ -72,7 +72,13 @@ in default = "/var/www/html"; 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}/ ''