mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
split _module.args and specialArgs
specialArgs are evaluated earlier and can therefore used in imports in the module system. This is the difference in comparison to _module.args.
This commit is contained in:
parent
587825a1e4
commit
d68467d679
3 changed files with 18 additions and 16 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||
# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||
|
||||
{ config ? null
|
||||
, extraModules ? [ ]
|
||||
|
|
@ -18,20 +18,11 @@ let
|
|||
else if builtins.pathExists defaultConfigFile then defaultConfigFile
|
||||
else pkgs.config.nix-on-droid or (throw "No config file found! Create one in ~/.config/nixpkgs/nix-on-droid.nix");
|
||||
|
||||
nodModules = import ./module-list.nix { inherit pkgs home-manager-path isFlake; };
|
||||
|
||||
rawModule = evalModules {
|
||||
modules = [
|
||||
{
|
||||
_module.args =
|
||||
{
|
||||
inherit home-manager-path isFlake;
|
||||
pkgs = mkDefault pkgs;
|
||||
}
|
||||
// extraSpecialArgs;
|
||||
}
|
||||
configModule
|
||||
]
|
||||
++ extraModules
|
||||
++ import ./module-list.nix { inherit pkgs isFlake; };
|
||||
modules = [ configModule ] ++ extraModules ++ nodModules;
|
||||
specialArgs = extraSpecialArgs;
|
||||
};
|
||||
|
||||
failedAssertions = map (x: x.message) (filter (x: !x.assertion) rawModule.config.assertions);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue