mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
lib.modules: support strings with absolute paths in disabledModules
This is particularly useful for disabling modules defined in a flake. Example: disabledModules = [ "${flake}/modules/mymodule.nix" ]; Previously, absolute string paths were internally prepended with `modulesPath`, which caused the module filtering to fail.
This commit is contained in:
parent
cbf9a129d2
commit
e2cc361970
3 changed files with 9 additions and 1 deletions
5
lib/tests/modules/disable-define-enable-string-path.nix
Normal file
5
lib/tests/modules/disable-define-enable-string-path.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
disabledModules = [ (toString ./define-enable.nix) ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue