Nix Flakes | 896 Members | |
| 181 Servers |
| Sender | Message | Time |
|---|---|---|
| 7 Nov 2023 | ||
In reply to @janik0:matrix.orgdunno about closure approach but you could merge them; nixpkgs.lib // (import ./lib) | 22:54:06 | |
* dunno about closure approach but you could merge them; lib = nixpkgs.lib // (import ./lib) | 22:54:28 | |
In reply to @crtified:crtified.meAh, yeah, so it is either the inherit (because external file) or inlining a closure. I prefer passing an attribute set to generate the module since the actual module is in another file, but to each their own :) (also makes it easier if you e.g. have a bunch of modules) | 22:57:17 | |
| Thanks for the example though! :) always nice to see alternative ways of solving issues ^^ | 22:57:47 | |
* you could merge them; lib = nixpkgs.lib // (import ./lib). Works with both closure and passing the attributeset, but you'll probably want a let in regardless | 22:58:39 | |
In reply to @crtified:crtified.me* I'll look into that later. I gave myself the challenge of getting a deeper understating of the nix lang and nixos module system so I'm Implementing a dns libary and module which gives necessary meta information to generate something like a octodns config. | 22:58:46 | |
In reply to @mib:kanp.aiof course, how else would I get people to do free qa :D | 23:00:57 | |
In reply to @janik0:matrix.orgOoooh, that does look pretty excellent! I’m skeptical of the proxy approach too, and I even more dislike having transitive deps inject those into my system dependencies… so today I switched from Eza to lsd (: | 23:37:47 | |
| 9 Nov 2023 | ||
| Hi, a friend just released a very small flake-parts module extension around perSystem in case someone wants to give it a try :3 https://github.com/vic/fp-nm-ws | 05:38:57 | |
| 06:33:38 | ||
In reply to @antifuchs:asf.computerout of curiosity. what's the extra transitive dep you're thinking of? zlib? :) | 21:00:23 | |
| I was pulling eza into my system definition flake, and it started using the proxy on its flake inputs for some reason | 21:17:29 | |
| So now that flake was using the proxy; I noticed because my hydra builds were failing in the sandbox | 21:17:59 | |
| Turns out I like lsd more (: | 21:18:15 | |
| ah i see :) | 21:39:47 | |
| 10 Nov 2023 | ||
| 07:35:14 | ||
Hello. I'm trying to do this:With the help of ChatGPT to try to get my modules configurable. I want to use them in different ways on different hosts | 13:21:37 | |
This is the networking module. I'm getting error: undefined variable 'options'. | 13:22:12 | |
| How do I pass the options to my module correctly? | 13:22:56 | |
Hmm. It works if I remove the options = {}. | 13:24:03 | |
| ah, well that's a simple issue. when you do
| 13:25:04 | |
| my point is that you're misusing the modules system. | 13:25:54 | |
| * ah, well that's a simple issue. when you do
| 13:26:19 | |
| Ok, I should re-read https://nixos.wiki/wiki/NixOS_modules then :) | 13:27:18 | |
| * my point is that you're misusing the modules system. ideally you could import like this instead
... but you might want to rethink your approach to configuring your hosts altogether. :) | 13:28:13 | |
I now did this:with That worked. This is the complete config by the way: https://github.com/Industrial/nixos-dotfiles/blob/main/flake.nix | 13:33:02 | |
| im pretty sure that completely breaks the modules system fyi..... but uh, i guess it does work lol | 13:37:44 | |
| Oh :< I shouldn't use that with flakes then? | 13:42:23 | |
| I just wanted reusable bits of config per program so I could keep program specific stuff in the same directory and also be able to pick features/programs for different computers I have. | 13:42:56 | |
| you're essentially bypassing the modules system when you're importing it like that | 13:44:04 | |