NixOS Module System | 202 Members | |
| 47 Servers |
| Sender | Message | Time |
|---|---|---|
| 5 Jun 2026 | ||
| See: https://github.com/NixOS/nix/pull/13986 | 19:53:47 | |
| To many things to do ^^ | 19:53:57 | |
| https://github.com/NixOS/nixpkgs/pull/528556 | 20:17:06 | |
| We can also save on lexical scope: https://github.com/NixOS/nixpkgs/pull/528563 | 20:27:44 | |
| with lib; with types; is used in a lot of files. | 20:28:16 | |
* broad with lib; with types; is used in a lot of files. | 20:28:40 | |
I really want to forbid the with statement :/ | 20:29:22 | |
| 6 Jun 2026 | ||
| What profiling tool is this | 01:39:43 | |
| NIX_SHOW_STATS=1 | 04:37:29 | |
| compared via this jq script i wrote
| 04:38:08 | |
| 19:53:22 | ||
| 7 Jun 2026 | ||
| 05:17:04 | ||
| 8 Jun 2026 | ||
I guess we could fix listOf by checking if the elemType may contain any submodule, and use the elemType.check then. However, we should make sure the error message does not add more confusion. Such as complaining that this is not an enumerated value, while we expect a list of enumerated values. | 13:00:41 | |
* I guess we could fix listOf by skipping if the elemType may contain any submodule, and use the elemType.check then. However, we should make sure the error message does not add more confusion. Such as complaining that this is not an enumerated value, while we expect a list of enumerated values. | 13:00:53 | |
* I guess we could fix listOf by skipping if the elemType may contain any submodule, and use the elemType.check otherwise. However, we should make sure the error message does not add more confusion. Such as complaining that this is not an enumerated value, while we expect a list of enumerated values. | 13:01:05 | |
| 22:31:59 | ||
| 9 Jun 2026 | ||
| 16:07:54 | ||
Hello, what do I have to do to get the mk... family of functions (mkMerge, mkIf, mkOveride, mkOrder, etc.) to work within a custom option type? I'm fairly certain my merge function just wraps around existing ones and yet all of them just come through in the output unchanged and I can't understand why | 16:12:39 | |
If I have a mkMerge at the level just above the option type then it all seems to work but anything further into it and it doesn't | 16:14:55 | |
| Do you have an example what your type is trying to do? | 16:15:20 | |
| 16:15:40 | |
| basically XML as Nix, where you can have lists of attrsets to define multiple of a node, and if a different option defines only one, I want it to handle that gracefully | 16:16:32 | |
| * basically XML as Nix, where you can have lists of attrsets to define multiple of a node, and if a different module defines only one, I want it to handle that gracefully | 16:17:53 | |
| A bit hard to tell from breifly reading. Usually you call mergeDefinitions loc type defs in your typeYou dont call the merge functions of other types. | 16:18:31 | |
| IIRC I based it off of what the merge functions for attrsOf and listOf do | 16:20:02 | |
Do you mean instead of (lib.types.attrsOf nodelike).merge loc ..., to do mergeDefinitons loc (lib.types.attrsOf nodelike) ...? | 16:21:18 | |
| Yes | 16:21:43 | |
| alright, I'll give that a try, thanks | 16:22:01 | |
| You need to pass the correct type to mergeDefinitions which will be used for merging the defs | 16:22:29 | |
| There are some more problems in your code.
| 16:26:03 | |