1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-15 17:50:53 +00:00
flake-parts/modules/nixosModules.nix
2023-05-29 13:52:03 -04:00

27 lines
607 B
Nix

{ self, lib, flake-parts-lib, ... }:
let
inherit (lib)
mapAttrs
mkOption
types
;
inherit (flake-parts-lib)
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 ]; });
description = ''
NixOS modules.
You may use this for reusable pieces of configuration, service modules, etc.
'';
};
};
};
}