diff --git a/clanServices/wifi/tests/eval-tests.nix b/clanServices/wifi/tests/eval-tests.nix index 981c85cc3..8713a6971 100644 --- a/clanServices/wifi/tests/eval-tests.nix +++ b/clanServices/wifi/tests/eval-tests.nix @@ -41,14 +41,14 @@ let # In this case it is 'self-zerotier-redux' # This is usually only used internally, but we can use it to test the evaluation of service module in isolation # evaluatedService = - # testFlake.clanInternals.inventoryClass.distributedServices.importedModulesEvaluated.self-zerotier-redux.config; + # testFlake.clanInternals.inventoryClass.distributedServices.servicesEval.config.mappedServices.self-zerotier-redux.config; in { test_simple = { inherit testFlake; expr = - testFlake.config.clan.clanInternals.inventoryClass.distributedServices.importedModulesEvaluated.self-wifi.config; + testFlake.config.clan.clanInternals.inventoryClass.distributedServices.servicesEval.config.mappedServices.self-wifi.config; expected = 1; # expr = { diff --git a/lib/inventory/distributed-service/all-services-wrapper.nix b/lib/inventory/distributed-service/all-services-wrapper.nix index 7da8d68b6..381f4c555 100644 --- a/lib/inventory/distributed-service/all-services-wrapper.nix +++ b/lib/inventory/distributed-service/all-services-wrapper.nix @@ -37,9 +37,6 @@ in { name, ... }: { _module.args._ctx = [ name ]; - _module.args.clanLib = specialArgs.clanLib; - _module.args.exports = config.exports; - _module.args.directory = directory; } ) diff --git a/lib/inventory/distributed-service/inventory-adapter.nix b/lib/inventory/distributed-service/inventory-adapter.nix index 8d82ed97d..7c19997b3 100644 --- a/lib/inventory/distributed-service/inventory-adapter.nix +++ b/lib/inventory/distributed-service/inventory-adapter.nix @@ -155,8 +155,6 @@ } ]; }; - importedModulesEvaluated = servicesEval.config.mappedServices; - in { inherit @@ -165,7 +163,6 @@ # Exposed for testing grouped allMachines - importedModulesEvaluated ; }; } diff --git a/lib/inventory/distributed-service/tests/default.nix b/lib/inventory/distributed-service/tests/default.nix index 6a7beb4db..048b0b14c 100644 --- a/lib/inventory/distributed-service/tests/default.nix +++ b/lib/inventory/distributed-service/tests/default.nix @@ -81,7 +81,7 @@ in { # Test that the module is mapped into the output # We might change the attribute name in the future - expr = res.importedModulesEvaluated ? "-simple-module"; + expr = res.servicesEval.config.mappedServices ? "-simple-module"; expected = true; inherit res; }; @@ -177,7 +177,7 @@ in { # Test that the module is mapped into the output # We might change the attribute name in the future - expr = lib.attrNames res.importedModulesEvaluated.self-A.instances; + expr = lib.attrNames res.servicesEval.config.mappedServices.self-A.instances; expected = [ "instance_bar" "instance_foo" @@ -233,7 +233,7 @@ in { # Test that the module is mapped into the output # We might change the attribute name in the future - expr = lib.attrNames res.importedModulesEvaluated.self-A.result.allMachines; + expr = lib.attrNames res.servicesEval.config.mappedServices.self-A.result.allMachines; expected = [ "jon" "sara" @@ -285,7 +285,7 @@ in { # Test that the module is mapped into the output # We might change the attribute name in the future - expr = lib.attrNames res.importedModulesEvaluated.self-A.result.allMachines; + expr = lib.attrNames res.servicesEval.config.mappedServices.self-A.result.allMachines; expected = [ "jon" "sara" diff --git a/lib/inventory/distributed-service/tests/per_instance_args.nix b/lib/inventory/distributed-service/tests/per_instance_args.nix index 6795c0ebc..9fe0c0316 100644 --- a/lib/inventory/distributed-service/tests/per_instance_args.nix +++ b/lib/inventory/distributed-service/tests/per_instance_args.nix @@ -107,7 +107,7 @@ in test_per_instance_arguments = { expr = { instanceName = - res.importedModulesEvaluated.self-A.result.allRoles.peer.allInstances."instance_foo".allMachines.jon.passthru.instanceName; + res.servicesEval.config.mappedServices.self-A.result.allRoles.peer.allInstances."instance_foo".allMachines.jon.passthru.instanceName; # settings are specific. # Below we access: @@ -115,11 +115,11 @@ in # roles = peer # machines = jon settings = - res.importedModulesEvaluated.self-A.result.allRoles.peer.allInstances.instance_foo.allMachines.jon.passthru.settings; + res.servicesEval.config.mappedServices.self-A.result.allRoles.peer.allInstances.instance_foo.allMachines.jon.passthru.settings; machine = - res.importedModulesEvaluated.self-A.result.allRoles.peer.allInstances.instance_foo.allMachines.jon.passthru.machine; + res.servicesEval.config.mappedServices.self-A.result.allRoles.peer.allInstances.instance_foo.allMachines.jon.passthru.machine; roles = - res.importedModulesEvaluated.self-A.result.allRoles.peer.allInstances.instance_foo.allMachines.jon.passthru.roles; + res.servicesEval.config.mappedServices.self-A.result.allRoles.peer.allInstances.instance_foo.allMachines.jon.passthru.roles; }; expected = { instanceName = "instance_foo"; @@ -160,9 +160,9 @@ in # TODO: Cannot be tested like this anymore test_per_instance_settings_vendoring = { - x = res.importedModulesEvaluated.self-A; + x = res.servicesEval.config.mappedServices.self-A; expr = - res.importedModulesEvaluated.self-A.result.allRoles.peer.allInstances.instance_foo.allMachines.jon.passthru.vendoredSettings; + res.servicesEval.config.mappedServices.self-A.result.allRoles.peer.allInstances.instance_foo.allMachines.jon.passthru.vendoredSettings; expected = { timeout = "config.thing"; }; diff --git a/lib/inventory/distributed-service/tests/per_machine_args.nix b/lib/inventory/distributed-service/tests/per_machine_args.nix index ac98a9ffe..5907e8bf2 100644 --- a/lib/inventory/distributed-service/tests/per_machine_args.nix +++ b/lib/inventory/distributed-service/tests/per_machine_args.nix @@ -79,7 +79,7 @@ in inherit res; expr = { hasMachineSettings = - res.importedModulesEvaluated.self-A.result.allMachines.jon.passthru.instances.instance_foo.roles.peer.machines.jon + res.servicesEval.config.mappedServices.self-A.result.allMachines.jon.passthru.instances.instance_foo.roles.peer.machines.jon ? settings; # settings are specific. @@ -88,10 +88,10 @@ in # roles = peer # machines = jon specificMachineSettings = - res.importedModulesEvaluated.self-A.result.allMachines.jon.passthru.instances.instance_foo.roles.peer.machines.jon.settings; + res.servicesEval.config.mappedServices.self-A.result.allMachines.jon.passthru.instances.instance_foo.roles.peer.machines.jon.settings; hasRoleSettings = - res.importedModulesEvaluated.self-A.result.allMachines.jon.passthru.instances.instance_foo.roles.peer + res.servicesEval.config.mappedServices.self-A.result.allMachines.jon.passthru.instances.instance_foo.roles.peer ? settings; # settings are specific. @@ -100,7 +100,7 @@ in # roles = peer # machines = * specificRoleSettings = - res.importedModulesEvaluated.self-A.result.allMachines.jon.passthru.instances.instance_foo.roles.peer; + res.servicesEval.config.mappedServices.self-A.result.allMachines.jon.passthru.instances.instance_foo.roles.peer; }; expected = { hasMachineSettings = true;