Closed akaihola closed 3 months ago
… while evaluating the module argument `inputs' in "/home/akaihola/repos/nixos-config/home-manager/emacs.nix
I think you're either not providing inputs
or providing it in a way not available while resolving imports (in particular, setting _module.args.inputs
will not work / could result in infinite recursion like this, see https://nixos.org/manual/nixpkgs/stable/#module-system-lib-evalModules-param-specialArgs).
For home-manager, that probably means adding home-manager.extraSpecialArgs = { inherit inputs; }
somewhere (I'd need to see more of your config to be more precise, sorry...)
I believe I solved the infinite recursion problem by adding in the outputs =
block of flake.nix
:
inputs @
on the outputs = inputs @ {
definitionimports = [ inputs.nix-doom-emacs-unstraightened.hmModule ];
extraSpecialArgs = { inherit inputs; };
For other newbies, it might be useful if your README mentioned those.
However, now programs.doom-emacs
can't be found.
Once I've solved this completely, I'll be happy to submit a PR to extend the README example for home-manager.
Actually, seems that in flake.nix
I need to add unstraightened into modules =[
instead of imports = [
!
Ah, right, that was more confusing than it needed to be...
imports = [ inputs.nix-doom-emacs-unstraightened.hmModule ]
should have worked in home.nix
. But unless you've broken up your config into a bunch of smaller modules, just adding it to modules
like you have makes more sense. And if you have split things up, you can probably figure out how to adapt your example, and the reverse is a lot harder.
Hopefully your PR #18 (thanks!) will make this a little easier for others in the future.
(Closing, please feel free to reopen if anything's still unclear or does not work)
I just did a stand-alone home-manager install on NixOS 24.05. If I add this to my home-manager configuration:
and run
I get