services: fix extraModules as path
This commit is contained in:
@@ -45,6 +45,7 @@ let
|
||||
};
|
||||
in
|
||||
clanLib.inventory.mapInstances {
|
||||
directory = ./.;
|
||||
clanCoreModules = { };
|
||||
flakeInputs = flakeInputsFixture;
|
||||
inherit inventory;
|
||||
@@ -52,6 +53,7 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
extraModules = import ./extraModules.nix { inherit clanLib; };
|
||||
exports = import ./exports.nix { inherit lib clanLib; };
|
||||
resolve_module_spec = import ./import_module_spec.nix { inherit lib callInventoryAdapter; };
|
||||
test_simple =
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{ clanLib }:
|
||||
let
|
||||
clan = clanLib.clan {
|
||||
self = { };
|
||||
directory = ./.;
|
||||
|
||||
machines.jon = {
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
};
|
||||
# A module that adds exports perMachine
|
||||
modules.A = {
|
||||
manifest.name = "A";
|
||||
roles.peer = { };
|
||||
};
|
||||
|
||||
inventory = {
|
||||
instances.A = {
|
||||
module.input = "self";
|
||||
roles.peer.tags.all = { };
|
||||
|
||||
roles.peer.extraModules = [ ./oneOption.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
test_1 = {
|
||||
inherit clan;
|
||||
expr = clan.config.nixosConfigurations.jon.config.testDebug;
|
||||
expected = 42;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
options.testDebug = lib.mkOption {
|
||||
default = 42;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user