diff options
author | Mx Kookie <kookie@spacekookie.de> | 2021-01-03 17:15:41 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2021-01-03 17:15:41 +0100 |
commit | 5a380913988033c25c7240ab677dcc549327357f (patch) | |
tree | 1de1c5febb2700095bacd3a2a2f3b6a8168115d9 /infra/corenix/default.nix | |
parent | 01ebfa7aac8c18965df1a089c50bffcf0052e967 (diff) | |
parent | aeac2f8adcd683ade3be74a4680d4e96f39aef49 (diff) |
Merge commit 'aeac2f8adcd683ade3be74a4680d4e96f39aef49' into main
Diffstat (limited to 'infra/corenix/default.nix')
-rw-r--r-- | infra/corenix/default.nix | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/infra/corenix/default.nix b/infra/corenix/default.nix index 1fbe54326228..44da28b62d67 100644 --- a/infra/corenix/default.nix +++ b/infra/corenix/default.nix @@ -1,6 +1,34 @@ -(import (fetchTarball { - url = - "https://github.com/edolstra/flake-compat/archive/94cf59784c73ecec461eaa291918eff0bfb538ac.tar.gz"; - sha256 = "03qz7h3hpb7jhlyidd4jxxncns40kvw8aqsq5l8d0rsdq9nj02qj"; -}) { src = ./.; }).defaultNix +{ ... }: +let + sources = import ./nix/sources.nix; + nixpkgsOptions = { + system = "x86_64-linux"; + overlays = [ (import ./pkgs/overlay.nix) ]; + }; + pkgs = import sources.nixpkgs nixpkgsOptions; + inherit (pkgs) lib; + + makeDevice = configFile: + (lib.evalModules { + modules = [ + ({ ... }: { nixpkgs = nixpkgsOptions; }) + ("${sources.nixpkgs}/nixos/modules/misc/assertions.nix") + ("${sources.nixpkgs}/nixos/modules/misc/nixpkgs.nix") + ./modules + configFile + ]; + }).config.corenix.rom; + +in rec { + inherit makeDevice; + + 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; +} |