mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
modules: introduce more arguments at top-level
This commit is contained in:
parent
7bae16e16d
commit
403336d4c4
1 changed files with 16 additions and 5 deletions
|
|
@ -1,6 +1,12 @@
|
||||||
# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE.
|
# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||||
|
|
||||||
{ pkgs ? import <nixpkgs> { }, home-manager-path ? <home-manager>, config ? null, isFlake ? false }:
|
{ config ? null
|
||||||
|
, extraModules ? [ ]
|
||||||
|
, extraSpecialArgs ? { }
|
||||||
|
, pkgs ? import <nixpkgs> { }
|
||||||
|
, home-manager-path ? <home-manager>
|
||||||
|
, isFlake ? false
|
||||||
|
}:
|
||||||
|
|
||||||
with pkgs.lib;
|
with pkgs.lib;
|
||||||
|
|
||||||
|
|
@ -16,12 +22,17 @@ let
|
||||||
rawModule = evalModules {
|
rawModule = evalModules {
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
_module.args.home-manager-path = home-manager-path;
|
_module.args =
|
||||||
_module.args.pkgs = mkDefault pkgs;
|
{
|
||||||
_module.args.isFlake = isFlake;
|
inherit home-manager-path isFlake;
|
||||||
|
pkgs = mkDefault pkgs;
|
||||||
|
}
|
||||||
|
// extraSpecialArgs;
|
||||||
}
|
}
|
||||||
configModule
|
configModule
|
||||||
] ++ import ./module-list.nix { inherit pkgs isFlake; };
|
]
|
||||||
|
++ extraModules
|
||||||
|
++ import ./module-list.nix { inherit pkgs isFlake; };
|
||||||
};
|
};
|
||||||
|
|
||||||
failedAssertions = map (x: x.message) (filter (x: !x.assertion) rawModule.config.assertions);
|
failedAssertions = map (x: x.message) (filter (x: !x.assertion) rawModule.config.assertions);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue