2023-05-29 17:52:03 +00:00
|
|
|
{ self, lib, flake-parts-lib, ... }:
|
2021-11-22 21:43:05 +00:00
|
|
|
let
|
|
|
|
inherit (lib)
|
|
|
|
mapAttrs
|
|
|
|
mkOption
|
|
|
|
types
|
|
|
|
;
|
2022-05-25 14:36:33 +00:00
|
|
|
inherit (flake-parts-lib)
|
2021-11-22 21:43:05 +00:00
|
|
|
mkSubmoduleOptions
|
|
|
|
;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
flake = mkSubmoduleOptions {
|
|
|
|
nixosModules = mkOption {
|
|
|
|
type = types.lazyAttrsOf types.unspecified;
|
|
|
|
default = { };
|
|
|
|
apply = mapAttrs (k: v: { _file = "${toString self.outPath}/flake.nix#nixosModules.${k}"; imports = [ v ]; });
|
2022-11-11 06:39:25 +00:00
|
|
|
description = ''
|
2021-11-22 21:43:05 +00:00
|
|
|
NixOS modules.
|
2022-11-11 05:40:37 +00:00
|
|
|
|
|
|
|
You may use this for reusable pieces of configuration, service modules, etc.
|
2021-11-22 21:43:05 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|