This repository was archived by the owner on Jun 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
This repository was archived by the owner on Jun 2, 2025. It is now read-only.
System for configuration is local system not the target system #31
Copy link
Copy link
Open
Description
I'm finding it weird that local system is used for nixpkgs here:
Lines 13 to 36 in 349f39d
| # using the same nixpkgs as nixos-rk3588 to utilize the cross-compilation cache. | |
| inherit (nixos-rk3588.inputs) nixpkgs; | |
| boardModule = nixos-rk3588.nixosModules.orangepi5; | |
| # 1. for cross-compilation on x86_64-linux | |
| system = "x86_64-linux"; | |
| # Compile the kernel using a cross-compilation tool chain | |
| # Which is faster than emulating the target system. | |
| pkgsKernel = import nixpkgs { | |
| localSystem = "x86_64-linux"; | |
| crossSystem = "aarch64-linux"; | |
| }; | |
| # 2. for native compilation on aarch64-linux SBCs. | |
| # system = "aarch64-linux"; | |
| # native compilation tool chain for the linux kernel | |
| # pkgsKernel = nixpkgs; | |
| in { | |
| colmena = { | |
| meta = { | |
| nixpkgs = import nixpkgs {inherit system;}; | |
| rk3588 = { | |
| inherit nixpkgs pkgsKernel; | |
| }; | |
| }; |
Can you explain how it works, because if you remove colmena from the configuration and make it regular nixos configuration and try to crosscompile it would look like this:
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
nixos-rk3588.nixosModules.orangepi5.core
nixos-rk3588.nixosModules.orangepi5.sd-image
./configuration.nix
];
specialArgs.rk3588 = {
inherit nixpkgs;
pkgsKernel = import nixpkgs {
localSystem = "x86_64-linux";
crossSystem = "aarch64-linux";
};
};
}Which is a bit weird, cause system is still aarch64-linux.
Metadata
Metadata
Assignees
Labels
No labels