only cross compile when necessary

This commit is contained in:
Vegard Bieker Matthey
2026-02-21 01:10:31 +01:00
parent dc8a6c8c71
commit 881ab20ae5

View File

@@ -106,20 +106,20 @@
}: }:
let let
commonPkgsConfig = { commonPkgsConfig = {
inherit localSystem crossSystem; config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg)
config.allowUnfreePredicate = [
pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11" "nvidia-x11"
"nvidia-settings" "nvidia-settings"
]; ];
overlays = overlays = (lib.optionals enableDefaults [
(lib.optionals enableDefaults [ # Global overlays go here
# Global overlays go here inputs.roowho2.overlays.default
inputs.roowho2.overlays.default ]) ++ overlays;
]) } // (if localSystem != crossSystem then {
++ overlays; inherit localSystem crossSystem;
}; } else {
system = crossSystem;
});
pkgs = import nixpkgs commonPkgsConfig; pkgs = import nixpkgs commonPkgsConfig;
unstablePkgs = import nixpkgs-unstable commonPkgsConfig; unstablePkgs = import nixpkgs-unstable commonPkgsConfig;