1
0
Fork 0
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:
Yang, Bo 2024-09-12 23:23:32 +00:00
parent bcef6817a8
commit f46c312332
2 changed files with 6 additions and 2 deletions

View file

@ -14,10 +14,10 @@ let
then module: module
else
module:
# TODO: set key?
{
_class = class;
_file = "${toString moduleLocation}#modules.${escapeNixIdentifier class}.${escapeNixIdentifier moduleName}";
key = "${toString moduleLocation}#modules.${escapeNixIdentifier class}.${escapeNixIdentifier moduleName}";
imports = [ module ];
};
in

View file

@ -15,7 +15,11 @@ in
nixosModules = mkOption {
type = types.lazyAttrsOf types.deferredModule;
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 = ''
NixOS modules.