mirror of
https://github.com/divnix/digga.git
synced 2024-09-11 06:55:55 +03:00
fix: infinite recursion
specialArgs (even though from submodules) cannot be obtained from within the module system
This commit is contained in:
parent
14e36e1133
commit
6562558a4b
@ -2,10 +2,12 @@
|
||||
|
||||
{ self, inputs, ... } @ args:
|
||||
let
|
||||
# avoid infinite recursions w.r.t. using self or inputs in imports
|
||||
injectedDeps' = injectedDeps // { inherit (args) self inputs; };
|
||||
|
||||
options' = import ./options.nix injectedDeps;
|
||||
fupAdapter' = import ./fup-adapter.nix injectedDeps;
|
||||
defaultOutputsBuilder' = import ./outputs-builder.nix injectedDeps;
|
||||
options' = import ./options.nix injectedDeps';
|
||||
fupAdapter' = import ./fup-adapter.nix injectedDeps';
|
||||
defaultOutputsBuilder' = import ./outputs-builder.nix injectedDeps';
|
||||
|
||||
evaled = lib.evalModules {
|
||||
modules = [
|
||||
|
@ -89,7 +89,8 @@ lib.systemFlake (lib.mergeAny
|
||||
# since we can't detect overlays owned by self
|
||||
# we have to filter out ones exported by the inputs
|
||||
# optimally we would want a solution for NixOS/nix#4740
|
||||
inherit (config.self) pkgs inputs;
|
||||
inherit (config.self) pkgs;
|
||||
inherit (config) inputs;
|
||||
};
|
||||
|
||||
outputsBuilder = channels:
|
||||
|
@ -1,5 +1,5 @@
|
||||
# constructor dependencies
|
||||
{ lib, devshell, ... }:
|
||||
{ lib, devshell, self, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
@ -321,10 +321,7 @@ let
|
||||
};
|
||||
|
||||
nixosType = with types; submoduleWith {
|
||||
specialArgs = {
|
||||
self = config.self;
|
||||
inputs = config.inputs;
|
||||
};
|
||||
specialArgs = { inherit self inputs; };
|
||||
modules = [
|
||||
{ options = (hostsOpt "nixos") // (hostDefaultsOpt "nixos") // importablesOpt; }
|
||||
legacyImportablesMod
|
||||
@ -332,10 +329,7 @@ let
|
||||
};
|
||||
|
||||
homeType = with types; submoduleWith {
|
||||
specialArgs = {
|
||||
self = config.self;
|
||||
inputs = config.inputs;
|
||||
};
|
||||
specialArgs = { inherit self inputs; };
|
||||
modules = [
|
||||
{ options = externalModulesOpt // (exportedModulesOpt "home") // importablesOpt // usersOpt; }
|
||||
legacyImportablesMod
|
||||
@ -343,10 +337,7 @@ let
|
||||
};
|
||||
|
||||
devshellType = with types; submoduleWith {
|
||||
specialArgs = {
|
||||
self = config.self;
|
||||
inputs = config.inputs;
|
||||
};
|
||||
specialArgs = { inherit self inputs; };
|
||||
modules = [
|
||||
{ options = externalModulesOpt // exportedDevshellModulesOpt; }
|
||||
];
|
||||
|
@ -1,5 +1,5 @@
|
||||
# constructor dependencies
|
||||
{ lib, deploy, devshell, home-manager }:
|
||||
{ lib, deploy, devshell, home-manager, ... }:
|
||||
config: channels:
|
||||
let
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user