Das Netzwerk in der Riesaer Str. 32
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
network/nix/lib/default.nix

31 lines
799 B

{ self, pkgs, openwrt }:
rec {
config = (import ./config { inherit self pkgs; }).config;
netmasks = import ./netmasks.nix;
subnet = import ./subnet { inherit pkgs; };
dns = import ./dns.nix { inherit pkgs config; };
openwrtModels = import ./openwrt-models.nix { inherit self openwrt; };
getOpenwrtModel = wantedModel:
let
models =
builtins.filter ({ models, ... }:
self.lib.any ({ model, ... }:
model == wantedModel
) models
) openwrtModels;
result =
builtins.foldl' (result: { data, ... }:
self.lib.recursiveUpdate result data
) {} models;
in
if builtins.length models > 0
then result
else builtins.trace "No data found for OpenWRT model ${wantedModel}"
{};
}