mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
Set key
for modules
and nixosModules
This commit is contained in:
parent
bcef6817a8
commit
f46c312332
2 changed files with 6 additions and 2 deletions
|
@ -14,10 +14,10 @@ let
|
||||||
then module: module
|
then module: module
|
||||||
else
|
else
|
||||||
module:
|
module:
|
||||||
# TODO: set key?
|
|
||||||
{
|
{
|
||||||
_class = class;
|
_class = class;
|
||||||
_file = "${toString moduleLocation}#modules.${escapeNixIdentifier class}.${escapeNixIdentifier moduleName}";
|
_file = "${toString moduleLocation}#modules.${escapeNixIdentifier class}.${escapeNixIdentifier moduleName}";
|
||||||
|
key = "${toString moduleLocation}#modules.${escapeNixIdentifier class}.${escapeNixIdentifier moduleName}";
|
||||||
imports = [ module ];
|
imports = [ module ];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -15,7 +15,11 @@ in
|
||||||
nixosModules = mkOption {
|
nixosModules = mkOption {
|
||||||
type = types.lazyAttrsOf types.deferredModule;
|
type = types.lazyAttrsOf types.deferredModule;
|
||||||
default = { };
|
default = { };
|
||||||
apply = mapAttrs (k: v: { _file = "${toString moduleLocation}#nixosModules.${k}"; imports = [ v ]; });
|
apply = mapAttrs (k: v: {
|
||||||
|
_file = "${toString moduleLocation}#nixosModules.${k}";
|
||||||
|
key = "${toString moduleLocation}#nixosModules.${k}";
|
||||||
|
imports = [ v ];
|
||||||
|
});
|
||||||
description = ''
|
description = ''
|
||||||
NixOS modules.
|
NixOS modules.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue