You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build a simple flake with snowfall, but when I try to use a namespaced module in my home configuration, I get the following error:
building the system configuration...
error:
… while calling the 'head' builtin
at /nix/store/4r8s42c9mwfvgdlxv0izb1cmlzrsb5nz-source/lib/attrsets.nix:1574:11:
1573| || pred here (elemAt values 1) (head values) then
1574| head values
| ^
1575| else
… while evaluating the attribute 'value'
at /nix/store/4r8s42c9mwfvgdlxv0izb1cmlzrsb5nz-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/4r8s42c9mwfvgdlxv0izb1cmlzrsb5nz-source/nixos/modules/system/activation/top-level.nix':
… while evaluating the option `assertions':
… while evaluating definitions from `/nix/store/q1ss75nhmjiydyqw8lbzwbx7cqk8z0qq-source/nixos/common.nix':
… while evaluating the module argument `namespace' in "/nix/store/9bwi858z3pzcgf9g40bwqvr52lz2zycd-s6wc8mk3jb8ja70aawm5s0ndmda1cyvh-source/homes/x86_64-linux/bear@nixos-laptop/default.nix":
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: infinite recursion encountered
at /nix/store/4r8s42c9mwfvgdlxv0izb1cmlzrsb5nz-source/lib/modules.nix:515:28:
514| addErrorContext (context name)
515| (args.${name} or config._module.args.${name})
| ^
516| ) (functionArgs f);
I am fairly surprised this is happening since the flake is as small as it can get. Just a module, a home configuration file and a system configuration file; here's their contents:
Ah I think this is an issue with using home-manager as a NixOS module. I checked and it looks like that path is the only one that does not pass down namespace. It absolutely should, this is a bug. We pass namespace to everything else, I am pretty sure that I missed this one instance.
More clearly stated: when using home-manager as a NixOS module, home-manager needs to have namespace passed as a specialArg, but Snowfall Lib is not doing that.
Hello.
I am trying to build a simple flake with snowfall, but when I try to use a namespaced module in my home configuration, I get the following error:
I am fairly surprised this is happening since the flake is as small as it can get. Just a module, a home configuration file and a system configuration file; here's their contents:
If i change
"${namespace}"
tointernal
it works.Thanks in advance.
The text was updated successfully, but these errors were encountered: