diff --git a/pkgs/by-name/op/opentofu/package.nix b/pkgs/by-name/op/opentofu/package.nix index 9c633b6c5ae0..03bb24119123 100644 --- a/pkgs/by-name/op/opentofu/package.nix +++ b/pkgs/by-name/op/opentofu/package.nix @@ -99,11 +99,24 @@ let in test; - plugins = removeAttrs terraform-providers [ - "override" - "overrideDerivation" - "recurseForDerivations" - ]; + plugins = + lib.mapAttrs + ( + _: provider: + # use opentofu plugin registry over terraform's + provider.override (oldArgs: { + provider-source-address = lib.replaceStrings [ "https://registry.terraform.io/providers" ] [ + "registry.opentofu.org" + ] oldArgs.homepage; + }) + ) + ( + removeAttrs terraform-providers [ + "override" + "overrideDerivation" + "recurseForDerivations" + ] + ); withPlugins = plugins: