aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Pässler <milan@petabyte.dev>2020-10-11 20:57:50 +0200
committerMilan Pässler <milan@petabyte.dev>2020-10-11 20:57:50 +0200
commitb00e192187b0df94682712d5ba5a88c923a6b0ce (patch)
tree26a07feff307fe7ca006c853c71590874a6dda62
parentd382e0adc079d89b09c7d36159dac282eff4d9d5 (diff)
add shortcut for use with flake-compat
-rw-r--r--README.md2
-rw-r--r--flake.nix16
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;
};
}