Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider fowarding inputs as extraSpecialArgs to home-manger modules by default home-manager.extraSpecialArgs.inputs = inputs; #45

Open
multivac61 opened this issue Oct 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@multivac61
Copy link

Is your feature request related to a problem? Please describe.

Spent half a day figuring out what this error message meant:

error:
       … while calling the 'head' builtin
         at /nix/store/s4s1whqp76y6jsaam6fw635gxdgi9gwc-source/lib/attrsets.nix:1575:11:
         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         else

       … while evaluating the attribute 'value'
         at /nix/store/s4s1whqp76y6jsaam6fw635gxdgi9gwc-source/lib/modules.nix:816:9:
          815|     in warnDeprecation opt //
          816|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          817|         inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/s4s1whqp76y6jsaam6fw635gxdgi9gwc-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `assertions':

       … while evaluating definitions from `/nix/store/vkv5170r6ajjgzffm9fly83mc4wc93by-source/nixos/common.nix':

       … while evaluating the module argument `inputs' in "/nix/store/72ld50ay4r2ngk2998sir8wgkgc48j1j-source/modules/home/myhome":

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: infinite recursion encountered
       at /nix/store/s4s1whqp76y6jsaam6fw635gxdgi9gwc-source/lib/modules.nix:515:28:
          514|         addErrorContext (context name)
          515|           (args.${name} or config._module.args.${name})
             |                            ^
          516|       ) (functionArgs f);

Turned out that my modules/home/myhome/default.nix was referencing inputs which hadn't been forwarded with extraSpedcialArgs

Describe the solution you'd like

inputs.self.homeModules.<...> to have access to inputs like other modules.

@multivac61 multivac61 added the enhancement New feature or request label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant