network/nix/lib/config/default.nix

40 lines
750 B
Nix

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