flakelight/builtinModules/lib.nix

21 lines
487 B
Nix
Raw Permalink Normal View History

2023-09-14 07:54:25 +02:00
# flakelight -- Framework for simplifying flake setup
# Copyright (C) 2023 Archit Gupta <archit@accelbread.com>
# SPDX-License-Identifier: MIT
{ config, lib, flakelight, moduleArgs, ... }:
2023-09-14 07:54:25 +02:00
let
inherit (lib) mkOption mkIf;
inherit (lib.types) attrsOf raw;
inherit (flakelight.types) optCallWith;
2023-09-14 07:54:25 +02:00
in
{
options.lib = mkOption {
type = optCallWith moduleArgs (attrsOf raw);
2023-09-14 07:54:25 +02:00
default = { };
};
config.outputs = mkIf (config.lib != { }) {
inherit (config) lib;
};
}