diff options
author | Milan Pässler <milan@petabyte.dev> | 2020-10-11 20:57:50 +0200 |
---|---|---|
committer | Milan Pässler <milan@petabyte.dev> | 2020-10-11 20:57:50 +0200 |
commit | b00e192187b0df94682712d5ba5a88c923a6b0ce (patch) | |
tree | 26a07feff307fe7ca006c853c71590874a6dda62 | |
parent | d382e0adc079d89b09c7d36159dac282eff4d9d5 (diff) |
add shortcut for use with flake-compat
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | flake.nix | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/README.md b/README.md index 26770792d870..b23d8abef18f 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 b235fa9ef5c1..5cf96ba82f04 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; }; } |