Revert "lib.buildNixpkgsConfig: limit rocm to only specific target"

This reverts commit 45c523bdaa.
This commit is contained in:
2025-10-02 19:05:32 +08:00
parent 45c523bdaa
commit d288376eed
3 changed files with 3 additions and 10 deletions

View File

@@ -32,7 +32,7 @@ inputs:
# SAHF FXSR XSAVE RDRND LZCNT HLE PREFETCHW SGX PCONFIG
"icelake-server"
];
nixpkgs = { march = "znver5"; rocm = [ "gfx1151" ]; };
nixpkgs = { march = "znver5"; rocm = true; };
sysctl.laptop-mode = 5;
kernel = { variant = "cachyos"; patches = [ "btusb" ]; };
};

View File

@@ -16,7 +16,7 @@ let
// (inputs.lib.optionalAttrs (nixpkgs.cuda.forwardCompat != null)
{ cudaForwardCompat = nixpkgs.cuda.forwardCompat; })
);
rocmConfig = inputs.lib.optionalAttrs (nixpkgs.rocm or null != null) { rocmSupport = true; };
rocmConfig = inputs.lib.optionalAttrs (nixpkgs.rocm or false) { rocmSupport = true; };
allowInsecurePredicate = p: inputs.lib.warn "Allowing insecure package ${p.name or "${p.pname}-${p.version}"}" true;
config = cudaConfig // rocmConfig
// {
@@ -173,12 +173,5 @@ in platformConfig //
# // (inputs.lib.optionalAttrs (nixpkgs.march == "silvermont")
# { c-blosc = prev.c-blosc.overrideAttrs { doCheck = false; }; })
# // (inputs.lib.optionalAttrs (nixpkgs.arch or null == "aarch64") { nix = final.nixVersions.nix_2_29; })
# pick from https://github.com/nix-community/nur-combined/blob/e60d2cac468d38a97874108c1601de2ce0ca23b8/repos/slaier/outputs/_hosts/local/hardware-configuration.nix#L45
// (inputs.lib.optionalAttrs (nixpkgs.rocm or null != null)
{
rocmPackages = prev.rocmPackages.overrideScope (final: prev:
{ clr = prev.clr.override { localGpuTargets = nixpkgs.rocm; }; });
})
)];
}

View File

@@ -12,7 +12,7 @@ inputs:
};});
default = null;
};
rocm = mkOption { type = types.nullOr (types.listOf types.str); default = null; };
rocm = mkOption { type = types.bool; default = false; };
};
config = let inherit (inputs.config.nixos.system) nixpkgs; in
{