network/nix/lib/config/default.nix

35 lines
613 B
Nix
Raw Normal View History

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