You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
49 lines
1.3 KiB
{
|
|
inputs.nixpkgs = {
|
|
type = "github";
|
|
owner = "NixOS";
|
|
repo = "nixpkgs";
|
|
ref = "master";
|
|
};
|
|
|
|
description = "A collections of derivations for coreboot and payloads";
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
nixpkgsOptions = {
|
|
system = "x86_64-linux";
|
|
overlays = [ (import ./pkgs/overlay.nix) ];
|
|
};
|
|
pkgs = import nixpkgs nixpkgsOptions;
|
|
inherit (pkgs) lib;
|
|
|
|
makeDevice = configFile:
|
|
(lib.evalModules {
|
|
modules = [
|
|
({ ... }: { nixpkgs = nixpkgsOptions; })
|
|
("${nixpkgs}/nixos/modules/misc/assertions.nix")
|
|
("${nixpkgs}/nixos/modules/misc/nixpkgs.nix")
|
|
./modules
|
|
configFile
|
|
];
|
|
}).config.corenix.rom;
|
|
|
|
exportedPkgs = {
|
|
inherit (pkgs)
|
|
coreboot coreboot-payload-grub2 coreboot-payload-tianocore
|
|
coreboot-payload-seabios coreboot-payload-tint
|
|
coreboot-payload-nvramcui coreboot-payload-coreinfo;
|
|
|
|
milan-x1c = makeDevice ./configs/milan/milan-x1c.nix;
|
|
milan-x230t = makeDevice ./configs/milan/milan-x230t.nix;
|
|
milan-x230-fhd = makeDevice ./configs/milan/milan-x230-fhd.nix;
|
|
};
|
|
|
|
in {
|
|
lib = { inherit makeDevice; };
|
|
|
|
packages.x86_64-linux = exportedPkgs;
|
|
|
|
# shortcut for use with flake-compat
|
|
pkgs = exportedPkgs;
|
|
};
|
|
}
|
|
|