How is this not resulting in infinite recursion? #8059
Answered
by
rycee
SymphonySimper
asked this question in
Q&A
-
|
Here home.activation =
let
name = "myCopy";
# filter is not required, but it's here to make sure nothing funky happens
entries = builtins.filter (entry: entry != name) (builtins.attrNames config.home.activation);
in
{
${name} = lib.hm.dag.entryAfter entries (
|
Beta Was this translation helpful? Give feedback.
Answered by
rycee
Jan 4, 2026
Replies: 1 comment 3 replies
-
|
I would think it works because So, something like the following hypothetical definition would probably cause problems: entries = filterAttrs (n: v: n != name && v != null) config.home.activation; |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
SymphonySimper
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would think it works because
entriesonly observes the attribute names ofconfig.home.activation, not the corresponding values. Ifentrieswas defined so that it also observed the value, then it should produce infinite recursion.So, something like the following hypothetical definition would probably cause problems: