Closed nikp123 closed 2 weeks ago
hey @nikp123 . Thanks for the heads up. I did not stumbled upon this bug yet.
I'll have a link to the issue your linked and try to reproduce. Do you maybe have a snippet with a buggy nix-flatpak
config? Though it might be a more general home-manager thing.
hey @nikp123 . Thanks for the heads up. I did not stumbled upon this bug yet.
I'll have a link to the issue your linked and try to reproduce. Do you maybe have a snippet with a buggy
nix-flatpak
config? Though it might be a more general home-manager thing.
IIRC, it's a home-manager thing. Apparently importing home-manager modules is scope specific due to a bug. IMO it's better to inform, just in case.
To reproduce the issue, you'll have to:
home.nix
filehome.nix
file you will import a file (example) home-subconfig.nix
Here's the original issue in case you haven't found it: https://github.com/nix-community/nixvim/issues/83
IIRC, it's a home-manager thing. Apparently importing home-manager modules is scope specific due to a bug. IMO it's better to inform, just in case.
To reproduce the issue, you'll have to:
1. put this or any other flake home-manager module as a flake input 2. import your home-manager instance in a (example) `home.nix` file 3. in that `home.nix` file you will import a file (example) `home-subconfig.nix` 4. and in that file you'll import this or any other home-manager module. **This fails.**
hey @nikp123, thanks for this. I was able to reproduce. As far as I can tell, nesting hm imports results in circular dependencies that breaks with an infinite recursion.
I added a warning to the README, hope this helps.
Let's keep this issue open as a way to further document workarounds / fixes.
Basically when importing an home-manager module outside of where you imported home-manager itself, you'll experience something like akin to this: https://github.com/GermanBread/declarative-flatpak/issues/9
I know that some people will run into this exact same issue, so it's better to warn them instead of leaving them with a confusing message.