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
|
|
|
|
|
2024-01-15 04:17:50 +01:00
|
|
|
{ config, lib, flakelight, moduleArgs, ... }:
|
2023-09-14 07:54:25 +02:00
|
|
|
let
|
|
|
|
inherit (lib) mkOption mkIf;
|
|
|
|
inherit (lib.types) attrsOf raw;
|
2024-01-15 04:17:50 +01:00
|
|
|
inherit (flakelight.types) optCallWith;
|
2023-09-14 07:54:25 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options.lib = mkOption {
|
2024-01-15 04:17:50 +01:00
|
|
|
type = optCallWith moduleArgs (attrsOf raw);
|
2023-09-14 07:54:25 +02:00
|
|
|
default = { };
|
|
|
|
};
|
|
|
|
|
|
|
|
config.outputs = mkIf (config.lib != { }) {
|
|
|
|
inherit (config) lib;
|
|
|
|
};
|
|
|
|
}
|