mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
1e8a89e5f8
tmp
29 lines
657 B
Nix
29 lines
657 B
Nix
{ config, self, lib, flake-parts-lib, moduleLocation, ... }:
|
|
let
|
|
inherit (lib)
|
|
filterAttrs
|
|
mapAttrs
|
|
mkOption
|
|
optionalAttrs
|
|
types
|
|
;
|
|
inherit (flake-parts-lib)
|
|
mkSubmoduleOptions
|
|
;
|
|
in
|
|
{
|
|
options = {
|
|
flake = mkSubmoduleOptions {
|
|
nixosModules = mkOption {
|
|
type = types.lazyAttrsOf types.unspecified;
|
|
default = { };
|
|
apply = mapAttrs (k: v: { _file = "${toString moduleLocation}#nixosModules.${k}"; imports = [ v ]; });
|
|
description = ''
|
|
NixOS modules.
|
|
|
|
You may use this for reusable pieces of configuration, service modules, etc.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|