3 ms·
Nix is the right tool for this, developing a tool to make Nix's UX easier is a great idea. Thanks for this!
by stavros 2y ago
Nix is the right tool for this, developing a tool to make Nix's UX easier is a great idea. Thanks for this!
- dirtbag__dad 2y agoWhat about dev containers?
- stavros 2y agoYou mean Docker? They tend to rot much more than I'd like, mostly because you forget to pin something at some point. With Nix, you can't forget.
- janjongboom 2y agoFYI, I've helped set up StableBuild (https://www.stablebuild.com https://www.stablebuild.com) to help pin stuff in Docker that's normally virtually impossible to pin (e.g. OS package repos, Docker base images, random files from the internet, etc.)
- 1oooqooq 2y agodid the word rot change meaning recently? pin is what causes rot, not what solves it.
- otabdeveloper4 2y agoGood luck with your Docker containers in three years. (You're gonna need it.)
- 0x457 2y agoDifferent kind of rot. With nix and flakes, I can come back to a project 5 years later and as long as external dependencies (i.e. package sources) still available it will bring me back straight to that environment like it was yesterday. If you have a Dockerfile from 5 years ago...well good luck building it today.
- 1oooqooq 2y agomy point stands, it's still trying to lie about the meaning of the word rot. it's just as delusional as docker original "rotting software will run in 5yrs" argument... nothing there goes against rot
- dirtbag__dad 2y agoErr — sorry I mean https://containers.dev/ https://containers.dev/ Which has pretty nice support across IDEs. For example - https://code.visualstudio.com/docs/devcontainers/containers https://code.visualstudio.com/docs/devcontainers/containers I set this up for my last company where we had all sorts of “works on my machine issues” and a needlessly painful onboarding experience. Local development became streamlined with this tooling BUT pre-apple silicon macs couldn’t handle running Docker like this. Glacially slow. We had a python monorepo with a bunch of services within it. I am curious whether nix is an alternative / improvement for this. Was going down the nix road at first but an infrastructure team member steered me toward devcontainers instead and I’ve been pretty happy since!
- ParetoOptimal 2y agoYou can create them with devenv, but they are actually reproducible : https://devenv.sh/containers/ https://devenv.sh/containers/ https://devenv.sh/integrations/codespaces-devcontainer/ https://devenv.sh/integrations/codespaces-devcontainer/
- 1oooqooq 2y agoi missed any description of the actual container content on those examples.
- 0x457 2y agoIIRC, it uses what is defined for shell environment. Just instead of activating on your machine, it produces OCI image with that environment. I have nixOS definitions that I can use to make a SD card image, overtake a running linux system via ssh, deploy to nixos via ssh, or deploy to a local system - all from one definition.
- pxc 2y agoContainers are a great deployment target, but they're not really a great development environment for a few reasons (e.g., they're Linux-specific, so they require extra virtualization on non-Linux operating systems, the kind of isolation they provide is more of a hindrance than a help when it comes to working on your local filesystem, and for them to be useful you have to set up infrastructure to push and pull your private containers to and from). Nix is a better fit for this, and when you're using Nix you can also have Nix generated containers for deployment. I think you can also use a container with Nix in to provide the devcontainers interface to devs who don't have Nix installed locally, and have it in turn use Nix against your project's flake to set up its environment.
- eadmund 2y ago> Nix is the right tool for this Or Guix, which has the advantage of a more pleasant language.
- earthling8118 2y agoThe language isn't the problem with nix.
- 0x457 2y agoIt's not "the problem", but it's a problem. It's better than alternatives, but it's hacky nature shows.
- ParetoOptimal 2y agoWell, if you believe: - discoverability is a problem in Nix - Guix encourages or "shepherds" more discoverable functions, modules, and abstractions Then the language could be a problem.
- nitsky 2y agoWhat is?
- chpatrick 2y agoYMMV, I really don't like lisp braces personally.
- otabdeveloper4 2y agoThat's, like, just your opinion, man. Scheme and/or Lisp is literally the worst language choice for this problem domain.
- 0x457 2y agoI wouldn't say it's the worst. I don't like Lisp and co, but I think it's alright for this. I don't like Guix for a very different reason.