Nix Language | 1872 Members | |
| Nix programming language | 345 Servers |
| Sender | Message | Time |
|---|---|---|
| 28 May 2026 | ||
Yes all is the attribute name from the default. Its attrs.<name> depending on what is defined | 09:36:13 | |
But also depends; if the user defined something with a higher prio it would discard all | 09:37:58 | |
| So there's no guaranteed way to actually get the defined options? | 11:41:48 | |
options.services.mastodon.sidekiqProcesses.valueMeta.attrs.all.configuration.options does | 11:59:34 | |
| Qyriad: What I'm saying is that the `all` in that attrPath is kinda random. If they happened to have called it "everything", the path would be different, and more importantly, what if the default was `{}` would the options types not be accessible at all? | 12:06:29 | |
| (BTW, Qyriad, I opened a Lix PR re stricter attrname documentation, https://gerrit.lix.systems/c/lix/+/5579) | 12:08:48 | |
| oh shit, thank you! | 12:12:04 | |
| Np, it's such a trivial change that there's really no rush. | 12:19:21 | |
In reply to @toonn:matrix.orgSurely for an attrsOf you would consume it "for each" defined attr? In this case you could mapAttrs over valueMeta to get each defined attr's submodule configuration. | 13:21:57 | |
| MattSturgeon: What defined attrs? I'm working with the option definitions not a realized configuration. | 13:36:27 | |
| Another submodule whose options I can't get at through valueMeta is pixelfed.nginx, `(head (head (services.pixelfed.nginx.type.functor.payload.elemType.functor.payload.modules)).imports).options` | 13:37:13 | |
| In an The submodule's The The So if I have an option Default values are also definitions (just with a low override priority). So in your earlier example | 13:48:25 | |
| * In an The submodule's The The So if I have an option Default values are also definitions (just with a low override priority). So in your earlier example | 13:55:06 | |
| * In an The submodule's The The So if I have an option Default values are also definitions (just with a low override priority). So in your earlier example | 13:57:04 | |
| * In an The submodule's The The So if I have an option Default values are also definitions (just with a low override priority). So in your earlier example | 14:00:14 | |
| 16:12:26 | ||
| The valueOf you describe sounds like what I actually want but I haven't seen it so far. Usually valueMeta is accompanied by value. | 19:54:12 | |
In reply to @toonn:matrix.orgThis is the type. Which doesn't carry the value nor the valueMeta. Qyriad showed correctly how to get the options of each attrs. You need to replace 'all' with a loop variable if you don't know it. | 20:17:38 | |
| * This is the type. Which doesn't carry the value nor the valueMeta. Qyriad showed correctly how to get the options of each attrs. You need to replace 'all' with a loop variable if you don't know the path or if you are mapping something | 20:18:09 | |
| hsjobeki: But `services.pixelfed.nginx.valueMeta` is `{}`. Not sure what a "loop variable" is, I assume you mean looping over all the attrs? | 20:48:41 | |
| 29 May 2026 | ||
Sorry valueOf was a typo. I meant valueMeta. By "loop" we mean use mapAttrs. | 00:21:12 | |
| 00:24:44 | |
is there any reason to prefer isNull over x == null? | 00:55:16 | |
| 00:58:41 | ||
| 01:23:03 | ||
| 02:45:34 | ||
| 03:03:14 | ||
| docs say it's equivalent. https://noogle.dev/f/builtins/isNull/ But I guess it's an additional lambda call performance wise. | 06:00:47 | |
| MattSturgeon: Yeah, that's what I thought. Still can't find a better way to get at the options for pixelfed.nginx though, there's no valueMeta containing the configuration AFAICT. | 07:57:27 | |
| 08:21:23 | ||