News for hackers. Stuff that matters.
Re:Zero to Nix, an unofficial, opinionated, gentle introduct... by suumcuique on Monday January 23, 2023 @01:11PM (#34492596)
I've been dipping my toes into the Nix ecosystem recently, having a dev environment per project with direnv is neat but how does this work with IDEs like VSCode or IntelliJ IDEA? For example, if I define a specific JDK in my project with Nix, will IntelliJ be able to pick this up? Does anyone have any good resources on how to set this up?

BTW, for others who just want to try it out without having to install anything on your system, there are docker containers you can use as a sandbox: docker run -it nixos/nix bash

Re:Zero to Nix, an unofficial, opinionated, gentle introduct... by bryanlarsen on Monday January 23, 2023 @01:34PM (#34492967)
I've just been starting my Emacs from the direnv to ensure it has the right dev tools. This works, but can be annoying. It'd be nice to have a better solution.
Re:Zero to Nix, an unofficial, opinionated, gentle introduct... by pxc on Monday January 23, 2023 @02:43PM (#34493903)
Does emacs-envrc work with nix-direnv?
Re:Zero to Nix, an unofficial, opinionated, gentle introduct... by casept on Monday January 23, 2023 @01:16PM (#34492686)
For vscode, I like the `arrterian.nix-env-selector` extension.

Can IntelliJ be configured to simply use whatever JDK belongs to the `javac` in PATH? If so, it should suffice to simply start it in a `nix-shell`. If not, maybe setting `JAVA_HOME` in your `.envrc` could help?

Re:Zero to Nix, an unofficial, opinionated, gentle introduct... by pxc on Monday January 23, 2023 @02:40PM (#34493863)
* * *
Re:Zero to Nix, an unofficial, opinionated, gentle introduct... by biggestlou on Monday January 23, 2023 @08:58PM (#34498095)
omg how did I not know about these?!?