aboutsummaryrefslogtreecommitdiff
path: root/infra/corenix/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/corenix/default.nix')
-rw-r--r--infra/corenix/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/infra/corenix/default.nix b/infra/corenix/default.nix
new file mode 100644
index 000000000000..44da28b62d67
--- /dev/null
+++ b/infra/corenix/default.nix
@@ -0,0 +1,34 @@
+{ ... }:
+
+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;
+}