Nix Dev Container - Looking for Contributors

I’d have a personal preference to bundle this functionality with numtide/devshell.

Can you expound on what you mean by bundle? The container image itself has nothing special in it, so I can’t currently think of a scenario where pointing it at a numtide/devshell flake wouldn’t work. The additional features (i.e, plugins and engines) would be more likely to clash. I also think home-manager duplicates some of the functionality.

I do like their approach of making a naked shell though.

I hope I’m not being abrasive. :slight_smile:

My line of thinking is that the most useful abstraction for the topic of development environments that the Nix Ecosystem has to offer is numtide/devshell.

But it’s currently missing the feature of devcontainers.

Afaik @nrdxp has had plans to make a suggestion to upstream to implement a devcontainer -wrapper for numtide/devshells leveraging nlewo/nix2container (which imo is the currently best abstraction over container in the Nix ecosystem).

I hope I’m not being abrasive.

Not at all, you’re the only one who has given feedback, so it’s much appreciated on my end :slight_smile:

Afaik @nrdxp has had plans to make a suggestion to upstream to implement a devcontainer -wrapper for numtide/devshell s leveraging nlewo/nix2container (which imo is the currently best abstraction over container in the Nix ecosystem).

I’ll dig into this a bit more, but AFAIK there’s a huge barrier to break through in regards to getting the tools that Visual Studio Code imports at runtime to run in a purely Nix-based system (I’m not familiar with what that project creates). It’s the primary reason why I started with Debian as the reference image in the design doc.

As a long time kakoune user, I have to admit that I’m yet to explore the VS Code barriers. :slight_smile:

But all-the-more it seems a valuable thing to attach it to something like numtide/devshell which already has wide adoption for the reason of potentially collecting feedback at a much higher rate.

Fair point, it does seem reasonable to reach out to the maintainers there before starting a parallel project. I’ve created a proposal here. Thanks for the idea.

fwiw, I have a minimal working nix2container based devshell2devcontainer function here. I will probably implement this directy in devshell proper and open a PR upstream soon to see if they would be keen to the idea.

The main use case right now is just to make the Nix shell easier to enter for those who do not have a local Nix installation. Eventually thought I would like to support VSCode, I haven’t done any coding toward that end yet, but I am hoping I can either reuse vscode-fhs directly or make a similar fhs environment inside the container for the plugins it wants to install.

1 Like

That proposal is a manifest appreciation for interfaces and contracts. :+1: – I may add GitHub - divnix/std: The Nix Flakes framework for perfectionists with deadlines [maintainer=@blaggacao] into the mix.

I came across that project a week or so ago but haven’t had time to fully wrap my head around it yet. It seems interesting from the outside, but also very complex :slight_smile:

Hosted by Flying Circus.