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:
Erik Arvstedt 2022-08-25 14:03:57 +02:00
parent cbf9a129d2
commit e2cc361970
No known key found for this signature in database
GPG key ID: 33312B944DD97846
3 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,5 @@
{ lib, ... }:
{
disabledModules = [ (toString ./define-enable.nix) ];
}