mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 14:31:55 +03:00
groups: rename commonModule -> overrideAll
This commit is contained in:
parent
f9f8b595d6
commit
c39edb8532
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}";
|
||||
|
Loading…
Reference in New Issue
Block a user