mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2025-03-30 19:54:47 +00:00
Merge ce46e8b415
into f4330d22f1
This commit is contained in:
commit
ff3bc742ab
2 changed files with 11 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -15,7 +15,16 @@ 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}";
|
||||
# Note: this neglects to represent potential differences due to input
|
||||
# overrides or flake-parts extendModules. However, the cost for this
|
||||
# is too high or plain infeasible respectively. We choose to implement
|
||||
# deduplication and disabledModules regardless, because not doing
|
||||
# so poses a more direct problem.
|
||||
key = "${toString moduleLocation}#nixosModules.${k}";
|
||||
imports = [ v ];
|
||||
});
|
||||
description = ''
|
||||
NixOS modules.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue