groups: remove options overrides and overrideAll

...since those are now managed by the dedicated overrides module
This commit is contained in:
DavHau 2024-03-17 21:35:04 +07:00 committed by mergify[bot]
parent 86e4b94689
commit 41a1973ed3
3 changed files with 4 additions and 32 deletions

View File

@ -5,5 +5,6 @@
}: {
imports = [
./interface.nix
../overrides
];
}

View File

@ -1,6 +1,6 @@
{
overrideAll,
globalOverrides,
overrides,
}: {
config,
dream2nix,
@ -12,13 +12,12 @@
packageType = name:
t.deferredModuleWith {
staticModules = [
{_module.args = specialArgs;}
# the top-level overrideAll
overrideAll
# the overrideAll of the current group
config.overrideAll
# the global overrides
(globalOverrides.${name} or {})
(overrides.${name} or {})
# the overrides of the current group
(config.overrides.${name} or {})
];

View File

@ -10,7 +10,7 @@
modules = [
(import ./group.nix {
inherit (config) overrideAll;
globalOverrides = config.overrides;
overrides = config.overrides;
})
];
inherit specialArgs;
@ -24,33 +24,5 @@ in {
Holds shared config (overrideAll) and overrides on a global and on a per group basis.
'';
};
overrideAll = lib.mkOption {
type = t.deferredModule;
description = ''
Common overrides for all packages.
Gets applied on all groups.
'';
default = {};
example = {
mkDerivation.doCheck = false;
};
};
overrides = lib.mkOption {
type = t.lazyAttrsOf (t.deferredModuleWith {
staticModules = [
{_module.args = specialArgs;}
];
});
description = ''
Overrides for specific package names.
Gets applied on all groups.
'';
default = {};
example = {
hello.postPatch = ''
substituteInPlace Makefile --replace /usr/local /usr
'';
};
};
};
}