From b00e192187b0df94682712d5ba5a88c923a6b0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Sun, 11 Oct 2020 20:57:50 +0200 Subject: [PATCH] add shortcut for use with flake-compat --- README.md | 2 +- flake.nix | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 26770792d87..b23d8abef18 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ 1. Create a configuration file for your device in `configs/` 2. Add an entry to flake.nix, i.e. `my-device = makeDevice ./configs/my-device.nix;` -3. Build the coreboot rom: `nix build .#my-device` +3. Build the coreboot rom: `nix build -A pkgs.my-device` *Features* diff --git a/flake.nix b/flake.nix index b235fa9ef5c..5cf96ba82f0 100644 --- a/flake.nix +++ b/flake.nix @@ -28,12 +28,8 @@ configFile ]; }).config.corenix.rom; - in { - lib = { - inherit makeDevice; - }; - packages.x86_64-linux = { + exportedPkgs = { inherit (pkgs) coreboot coreboot-payload-grub2 @@ -45,5 +41,15 @@ milan-x1c = makeDevice ./configs/milan-x1c.nix; milan-x230t = makeDevice ./configs/milan-x230t.nix; }; + + in { + lib = { + inherit makeDevice; + }; + + packages.x86_64-linux = exportedPkgs; + + # shortcut for use with flake-compat + pkgs = exportedPkgs; }; }