summaryrefslogtreecommitdiff
path: root/default.nix
blob: 1c699c2efa0e31ad089b51f0909978cdb496f462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ 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;
}