forked from zentralwerk/network
lib: move into lib/config
This commit is contained in:
parent
bf06bbe809
commit
7b7745e376
|
@ -12,6 +12,9 @@
|
|||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in
|
||||
rec {
|
||||
lib = forAllSystems (system:
|
||||
import ./nix/lib { inherit nixpkgs system; }
|
||||
);
|
||||
|
||||
packages = forAllSystems (system: {
|
||||
test_vm = nixpkgs.legacyPackages.${system}.runCommandLocal "test_vm" {
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
let
|
||||
result = pkgs.lib.evalModules {
|
||||
args.pkgs = pkgs;
|
||||
modules = [
|
||||
./options.nix
|
||||
./legacy.nix
|
||||
./device-templates.nix
|
||||
];
|
||||
};
|
||||
in
|
||||
builtins.foldl' (config: warnings:
|
||||
if warnings == []
|
||||
then config
|
||||
else
|
||||
builtins.trace "WARNING: ${builtins.head warnings}" config
|
||||
) result.config result.config.warnings
|
|
@ -1,18 +1,12 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
{ nixpkgs, system }:
|
||||
|
||||
let
|
||||
result = pkgs.lib.evalModules {
|
||||
args.pkgs = pkgs;
|
||||
modules = [
|
||||
./options.nix
|
||||
./legacy.nix
|
||||
./device-templates.nix
|
||||
];
|
||||
};
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
builtins.foldl' (config: warnings:
|
||||
if warnings == []
|
||||
then config
|
||||
else
|
||||
builtins.trace "WARNING: ${builtins.head warnings}" config
|
||||
) result.config result.config.warnings
|
||||
{
|
||||
config = import ./config { inherit pkgs; };
|
||||
|
||||
netmasks = import ./netmasks.nix;
|
||||
|
||||
subnet = import ./subnet { inherit pkgs; };
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue