c074dab95f
this makes it easier to generate a bunch of scripts from a single configuration without having to deal with multiple result links.
26 lines
438 B
Nix
26 lines
438 B
Nix
{ pkgs ? import <nixpkgs> { config = {}; overlays = []; }
|
|
, configuration
|
|
}:
|
|
|
|
let
|
|
evaluated = pkgs.lib.evalModules {
|
|
modules = [
|
|
./openwrt
|
|
configuration
|
|
];
|
|
specialArgs = {
|
|
inherit pkgs;
|
|
};
|
|
};
|
|
in
|
|
|
|
pkgs.buildEnv rec {
|
|
name = "dewclaw-env";
|
|
|
|
paths = builtins.attrValues passthru.targets;
|
|
|
|
passthru.targets =
|
|
pkgs.lib.mapAttrs
|
|
(_: dev: dev.build.deploy)
|
|
evaluated.config.openwrt;
|
|
}
|