network/nix/lib/config/default.nix

35 lines
613 B
Nix

{ self
, pkgs ? import <nixpkgs> {}
, gpgKey
}:
let
result = pkgs.lib.evalModules {
args = {
inherit self pkgs;
};
modules = [
./options.nix
./legacy.nix
(
{ lib, ... }:
with lib;
{
options.gpgKey = mkOption {
type = with types; nullOr path;
};
config = {
inherit gpgKey;
};
}
)
];
};
in
builtins.foldl' (config: warnings:
if warnings == []
then config
else
builtins.trace "WARNING: ${builtins.head warnings}" config
) result.config result.config.warnings