aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
blob: 99be3070f2ee9af954640895fc4e91e82acd9568 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
  inputs.nixpkgs = {
    type = "github";
    owner = "nixos";
    repo = "nixpkgs";
    ref = "master";
  };

  description = "A collections of derivations for coreboot and payloads";
  outputs = { self, nixpkgs }: {
    packages.x86_64-linux = let
      pkgs = import nixpkgs {
        system = "x86_64-linux";
        overlays = [
          (import ./pkgs/overlay.nix)
        ];
      };
      inherit (pkgs) lib;

      makeDevice = configFile:
        with lib.evalModules {
          modules = [
            ./modules
            configFile
          ];
        };
      system.config.coreboot.rom;
    in {
      inherit (pkgs) coreboot-payload-grub2 coreboot-payload-tianocore coreboot;

      milan-x1c = makeDevice ./configs/milan-x1c.nix;
    };
  };
}