4 ms·
Dendritic flake! Love to see it. Curious though, if you just import the default.nix and the default.nix imports everything, why not just import everything in mo
by rrvsh 4mo ago
Dendritic flake! Love to see it. Curious though, if you just import the default.nix and the default.nix imports everything, why not just import everything in modules/ and hosts/?
- pkulak 4mo agoHmmm... not sure I understand. My setup recursively imports every default.nix in modules and hosts. About that... I don't have a really great defense. It's how the little template I started out with did it. :D I do like it though.
- rrvsh 4mo agothe usual practise when using flake-parts and import-tree is to forego the default.nix completely and just import the entire folder without needing to explicitly register each file in a default.nix. you can view an example at my flake here: https://github.com/rrvsh/tools/blob/256b38535d62a2930ad27161e04a9c5aada6207c/flake.nix#L5 https://github.com/rrvsh/tools/blob/256b38535d62a2930ad27161... https://github.com/rrvsh/tools/tree/256b38535d62a2930ad27161e04a9c5aada6207c/nix https://github.com/rrvsh/tools/tree/256b38535d62a2930ad27161... but its just a different way to do things, not a better way! if you like it, you should keep it :)
- pkulak 4mo agoOh! Yes, you're totally right. I remember going to a bit of trouble in the beginning to filter to default.nix, because yes, the template absolutely just imported everything. I must have had some good reason, but that reason is lost to time. Maybe because I have stuff like this: https://github.com/pkulak/nix/blob/main/modules/features/jai/nixos/jai.nix https://github.com/pkulak/nix/blob/main/modules/features/jai... Not totally sure, but I feel like importing that wouldn't work. Probably you're supposed to put packages in their own place, I guess. But yeah, what I've got works. haha Unrelated, but thanks for sharing your config! There are a lot of really good ideas in there, and I've only looked at a few files.
- rrvsh 4mo agofor packages you just wrap them in `perSystem` and prefix the methods with `pkgs.*`, for example: [1] Also unrelated, how are you liking Jai? I was following it before it was released but haven't had the time to try it out - I've heard good things even beyond gamedev use cases [1] https://github.com/rrvsh/tools/blob/prime/nix%2Fpackages%2Fsite.nix https://github.com/rrvsh/tools/blob/prime/nix%2Fpackages%2Fs...