48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{
|
|
description = "NixOS for SHARP Brain (i.MX28)";
|
|
|
|
inputs = {
|
|
# Use the latest stable NixOS release channel (non-unstable).
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, ... }:
|
|
let
|
|
buildSystem = "x86_64-linux";
|
|
crossSystem = import ./nix/platform.nix { lib = nixpkgs.lib; };
|
|
|
|
pkgsHost = import nixpkgs {
|
|
localSystem = buildSystem;
|
|
};
|
|
|
|
pkgsKernelCross = import nixpkgs {
|
|
localSystem = buildSystem;
|
|
crossSystem = crossSystem;
|
|
};
|
|
|
|
pkgsKernelNative = import nixpkgs {
|
|
localSystem = crossSystem;
|
|
};
|
|
in {
|
|
nixosConfigurations.brain-cross = nixpkgs.lib.nixosSystem {
|
|
system = buildSystem;
|
|
specialArgs = {
|
|
pkgsKernel = pkgsKernelCross;
|
|
};
|
|
modules = [
|
|
{
|
|
nixpkgs.crossSystem = crossSystem;
|
|
}
|
|
./modules/brain.nix
|
|
./modules/sd-image/sd-image-brain.nix
|
|
];
|
|
};
|
|
|
|
packages.${buildSystem} = {
|
|
sdImage = self.nixosConfigurations.brain-cross.config.system.build.sdImage;
|
|
ubootPwsh6 = (import ./nix/uboot.nix { pkgs = pkgsHost; }).pwsh6;
|
|
pkgsKernelCross = pkgsKernelCross;
|
|
pkgsKernelNative = pkgsKernelNative;
|
|
};
|
|
};
|
|
}
|