forked from zentralwerk/network
23 lines
496 B
Nix
23 lines
496 B
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
# https://github.com/NixOS/nixpkgs/pull/206965
|
|
concatMapAttrsRecursive = with lib; f: flip pipe [ (mapAttrs f) attrValues (foldl' recursiveUpdate { }) ];
|
|
in
|
|
{
|
|
imports = [
|
|
# Secrets
|
|
./secrets.nix
|
|
|
|
# Hardware
|
|
./vlan.nix
|
|
./switch.nix
|
|
./ap.nix
|
|
./server.nix
|
|
]
|
|
# IP networks
|
|
++ lib.filesystem.listFilesRecursive ./net;
|
|
|
|
site.net-combined = concatMapAttrsRecursive (name: value: { inherit (value) hosts4 hosts6; }) config.site.net;
|
|
}
|