Loading nixos/modules/services/backup/borgbackup.nix +7 −2 Original line number Diff line number Diff line Loading @@ -206,16 +206,17 @@ let original, name, set ? { }, extraArgs ? null, }: pkgs.runCommand "${name}-wrapper" { nativeBuildInputs = [ pkgs.makeWrapper ]; } '' makeWrapper "${original}" "$out/bin/${name}" \ ${lib.concatStringsSep " \\\n " ( lib.mapAttrsToList (name: value: ''--set ${name} "${value}"'') set (lib.mapAttrsToList (name: value: ''--set ${name} "${value}"'') set) ++ (lib.optional (extraArgs != null) ''--add-flags "${extraArgs}"'') )} ''; Loading @@ -230,6 +231,7 @@ let } // (mkPassEnv cfg) // cfg.environment; extraArgs = cfg.extraArgs or null; }); # Paths listed in ReadWritePaths must exist before service is started Loading Loading @@ -778,6 +780,9 @@ in description = '' Additional arguments for all {command}`borg` calls the service has. Handle with care. These extra arguments also get included in the wrapper script for this job. ''; default = [ ]; example = [ "--remote-path=/path/to/borg" ]; Loading nixos/tests/borgbackup.nix +2 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,8 @@ in repo = remoteRepo; encryption.mode = "none"; startAt = [ ]; environment.BORG_RSH = "ssh -oStrictHostKeyChecking=no -i /root/id_ed25519"; # This uses extraArgs instead of BORG_RSH to test propagation of these args extraArgs = [ "--rsh=ssh -oStrictHostKeyChecking=no -i /root/id_ed25519" ]; }; commandFail = { Loading Loading
nixos/modules/services/backup/borgbackup.nix +7 −2 Original line number Diff line number Diff line Loading @@ -206,16 +206,17 @@ let original, name, set ? { }, extraArgs ? null, }: pkgs.runCommand "${name}-wrapper" { nativeBuildInputs = [ pkgs.makeWrapper ]; } '' makeWrapper "${original}" "$out/bin/${name}" \ ${lib.concatStringsSep " \\\n " ( lib.mapAttrsToList (name: value: ''--set ${name} "${value}"'') set (lib.mapAttrsToList (name: value: ''--set ${name} "${value}"'') set) ++ (lib.optional (extraArgs != null) ''--add-flags "${extraArgs}"'') )} ''; Loading @@ -230,6 +231,7 @@ let } // (mkPassEnv cfg) // cfg.environment; extraArgs = cfg.extraArgs or null; }); # Paths listed in ReadWritePaths must exist before service is started Loading Loading @@ -778,6 +780,9 @@ in description = '' Additional arguments for all {command}`borg` calls the service has. Handle with care. These extra arguments also get included in the wrapper script for this job. ''; default = [ ]; example = [ "--remote-path=/path/to/borg" ]; Loading
nixos/tests/borgbackup.nix +2 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,8 @@ in repo = remoteRepo; encryption.mode = "none"; startAt = [ ]; environment.BORG_RSH = "ssh -oStrictHostKeyChecking=no -i /root/id_ed25519"; # This uses extraArgs instead of BORG_RSH to test propagation of these args extraArgs = [ "--rsh=ssh -oStrictHostKeyChecking=no -i /root/id_ed25519" ]; }; commandFail = { Loading