groups: rename commonModule -> overrideAll

This commit is contained in:
DavHau 2023-10-29 18:00:10 +00:00 committed by mergify[bot]
parent f9f8b595d6
commit c39edb8532
4 changed files with 12 additions and 12 deletions

View File

@ -53,7 +53,7 @@ in {
;
};
pdm.sourceSelector = lib.mkDefault selectWheel;
commonModule = {
overrideAll = {
options.sourceSelector = import ./sourceSelectorOption.nix {inherit lib;};
# TODO: per dependency selector isn't yet respected
config.sourceSelector = lib.mkOptionDefault config.pdm.sourceSelector;

View File

@ -1,5 +1,5 @@
{
commonModule,
overrideAll,
globalOverrides,
}: {
config,
@ -13,10 +13,10 @@
t.deferredModuleWith {
staticModules = [
{_module.args = specialArgs;}
# the top-level commonModule
commonModule
# the commonModule of the current group
config.commonModule
# the top-level overrideAll
overrideAll
# the overrideAll of the current group
config.overrideAll
# the global overrides
(globalOverrides.${name} or {})
# the overrides of the current group
@ -25,7 +25,7 @@
};
in {
options = {
commonModule = lib.mkOption {
overrideAll = lib.mkOption {
type = t.deferredModule;
description = ''
Common configuration for all packages in all groups

View File

@ -9,7 +9,7 @@
groupType = t.submoduleWith {
modules = [
(import ./group.nix {
inherit (config) commonModule;
inherit (config) overrideAll;
globalOverrides = config.overrides;
})
];
@ -21,10 +21,10 @@ in {
type = t.lazyAttrsOf groupType;
description = ''
Holds multiple package sets (eg. groups).
Holds shared config (commonModule) and overrides on a global and on a per group basis.
Holds shared config (overrideAll) and overrides on a global and on a per group basis.
'';
};
commonModule = lib.mkOption {
overrideAll = lib.mkOption {
type = t.deferredModule;
description = ''
Common configuration for all packages in all groups

View File

@ -26,10 +26,10 @@ in {
expected = true;
};
test_groups_commonModule = let
test_groups_overrideAll = let
config = eval {
groups.my-group.packages.hello."1.0.0".module = {...}: fixtures.basic-derivation;
commonModule = {name = lib.mkForce "hello-mod";};
overrideAll = {name = lib.mkForce "hello-mod";};
};
in {
expr = "${config.groups.my-group.packages.hello."1.0.0".public.name}";