Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hmmm... 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.


the 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/256b38535d62a2930ad27161... 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 :)


Oh! 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...

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.


for 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%2Fs...




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: