fix(nix-lib): Allow defining top-level imports

This commit is contained in:
Tom Hubrecht 2024-11-12 12:29:36 +01:00
parent 420fe99984
commit 21b422b1ad
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc

View file

@ -190,8 +190,11 @@ rec {
recursiveFuse [
(enableModules enabledModules)
{ imports = mkImports root ([ "_hardware-configuration" ] ++ enabledServices); }
{
imports =
(extraConfig.imports or [ ]) ++ (mkImports root ([ "_hardware-configuration" ] ++ enabledServices));
}
extraConfig
(removeAttrs extraConfig [ "imports" ])
];
}