Feat(clanServices): expose all other instance options than nixosModule
This is usefull for augmenting the perInstance module
This commit is contained in:
@@ -240,22 +240,21 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# instances.{instanceName}.roles.{roleName}.settings
|
# instances.{instanceName}.roles.{roleName}.settings
|
||||||
# options._settings = mkOption { };
|
# options._settings = mkOption { };
|
||||||
# options._settingsViaTags = mkOption { };
|
# options._settingsViaTags = mkOption { };
|
||||||
# A deferred module that combines _settingsViaTags with _settings
|
# A deferred module that combines _settingsViaTags with _settings
|
||||||
options.settings = mkOption {
|
options.settings = mkOption {
|
||||||
type = types.raw;
|
type = types.raw;
|
||||||
description = "Settings of 'role': ${name}";
|
description = "Settings of 'role': ${name}";
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
options.extraModules = lib.mkOption {
|
options.extraModules = lib.mkOption {
|
||||||
default = [ ];
|
default = [ ];
|
||||||
type = types.listOf (types.deferredModule);
|
type = types.listOf (types.deferredModule);
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
)
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -646,15 +645,14 @@ in
|
|||||||
let
|
let
|
||||||
instanceRes = roleCfg.perInstance instanceName machineName;
|
instanceRes = roleCfg.perInstance instanceName machineName;
|
||||||
in
|
in
|
||||||
{
|
instanceRes
|
||||||
|
// {
|
||||||
nixosModule = {
|
nixosModule = {
|
||||||
imports = [
|
imports = [
|
||||||
# Result of the applied 'perInstance = {...}: { nixosModule = { ... }; }'
|
# Result of the applied 'perInstance = {...}: { nixosModule = { ... }; }'
|
||||||
instanceRes.nixosModule
|
instanceRes.nixosModule
|
||||||
] ++ instanceCfg.roles.${roleName}.extraModules;
|
] ++ instanceCfg.roles.${roleName}.extraModules;
|
||||||
};
|
};
|
||||||
# TODO: nested services
|
|
||||||
services = { };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
) instanceCfg.roles.${roleName}.machines or { };
|
) instanceCfg.roles.${roleName}.machines or { };
|
||||||
|
|||||||
Reference in New Issue
Block a user