1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2025-03-05 16:36:56 +00:00
flake-parts/modules/nixosModules.nix

28 lines
607 B
Nix
Raw Normal View History

2023-05-29 13:52:03 -04:00
{ self, lib, flake-parts-lib, ... }:
2021-11-22 22:43:05 +01:00
let
inherit (lib)
mapAttrs
mkOption
types
;
2022-05-25 16:36:33 +02:00
inherit (flake-parts-lib)
2021-11-22 22:43:05 +01: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 07:39:25 +01:00
description = ''
2021-11-22 22:43:05 +01:00
NixOS modules.
2022-11-11 06:40:37 +01:00
You may use this for reusable pieces of configuration, service modules, etc.
2021-11-22 22:43:05 +01:00
'';
};
};
};
}