nixpkgs.hostPlatform: set as default, to allow hosts to customize it later

This commit is contained in:
Colin 2023-05-11 22:39:08 +00:00
parent a077009064
commit 3bdbd9db7b
2 changed files with 5 additions and 13 deletions

View File

@ -116,10 +116,12 @@
self.overlays.pkgs
# self.overlays.optimizations
];
nixpkgs.hostPlatform = target;
}
({ lib, ... }: {
nixpkgs.hostPlatform = lib.mkDefault target;
# nixpkgs.buildPlatform = local; # set by instantiate.nix instead
# nixpkgs.config.replaceStdenv = { pkgs }: pkgs.ccacheStdenv;
}
})
];
});
in {

View File

@ -4,7 +4,7 @@
{ hostName, localSystem }:
# module args
{ config, lib, ... }:
{ lib, ... }:
{
imports = [
@ -16,14 +16,4 @@
networking.hostName = hostName;
nixpkgs.buildPlatform = lib.mkIf (localSystem != null) localSystem;
sane.cross.enablePatches = localSystem != null;
# nixpkgs.overlays = [
# (next: prev: {
# # for local != target we by default just emulate the target while building.
# # provide a `pkgs.cross.<pkg>` alias that consumers can use instead of `pkgs.<foo>`
# # to explicitly opt into non-emulated cross compilation for any specific package.
# # this is most beneficial for large packages with few pre-requisites -- like Linux.
# cross = prev.crossFrom."${localSystem}";
# })
# ];
}