forked from extern/flakelight
Add lib option
This commit is contained in:
parent
53f35dc91c
commit
712a66158c
19
builtinModules/lib.nix
Normal file
19
builtinModules/lib.nix
Normal file
@ -0,0 +1,19 @@
|
||||
# flakelight -- Framework for simplifying flake setup
|
||||
# Copyright (C) 2023 Archit Gupta <archit@accelbread.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib) mkOption mkIf;
|
||||
inherit (lib.types) attrsOf raw;
|
||||
in
|
||||
{
|
||||
options.lib = mkOption {
|
||||
type = attrsOf raw;
|
||||
default = { };
|
||||
};
|
||||
|
||||
config.outputs = mkIf (config.lib != { }) {
|
||||
inherit (config) lib;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user