Hacker Newsnew | past | comments | ask | show | jobs | submit | pushtheenvelope's commentslogin

Devbox aims to solve this very problem: https://www.jetify.com/devbox


blackr, if you'd allow a small plug: we develop https://jetpack.io/devbox for this very scenario.

Devbox will give you the same project environment (packages, env-vars) on your work and home laptop. It leverages nix, and uses your native file-system avoiding the overhead and complexity of using Docker.


yikes! thanks for pointing that out. The blog's renderer is confused too and renders the `#cowsay -- flakes are neat` as a comment.

To explain what's happening:

- The example above is running `nix run <flake output attribute> -- <arguments to pass to the flake output's binary>`.

- The `<flake output attribute>` here is `.#cowsay`, which is to be read as: `<flake reference>#<attribute path>`. The # is a separator here.

- The `<flake reference>` being `.` implies its a local flake at the current directory. The `<attribute path>` in this case is the output from the flake i.e. the `cowsay` program.

further fun to be found at: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix....

As a meta-comment, yeah, this is kinda non-trivial for most of us. This is why we build devbox which provides a more familiar UX like `devbox add cowsay && devbox run -- cowsay "flakes are neat"`


I love the analogy!

I think this is a great strength of flakes. Packaging an application can sometimes have nuances that external folks may not be fully aware of and so having the packaging instructions (i.e. flake.nix) defined in the core repository can narrow that knowledge gap.


ah, yeah, we have a cheeky workaround for this in Devbox ;-)

https://github.com/jetpack-io/devbox/blob/main/internal/impl...


Oh, it isn't intended to be provocative.

The title is simply literally the question that I was thinking about a few months ago when working on Devbox, and wrote a version of this post internally to answer the question for myself!


Ah, that's good to know :) It is just that I was expecting to read about some breaking news; that I missed that Nix deprecated channels or something! It is indeed a nice article explaining Flakes in general. Maybe "Why did Nix introduce Flakes?" might be a slightly better title for people coming with prior expectations like I did?


s/adopt/introduce

done :)


Thank you; that was quick! :) I apologise if my original comment came across as rather harsh!


idk, someone (moderator?) changed it back ...


would you mind elaborating on the difference?


+1 in exact same situation


There is a very good presentation on the Case for Electronic Cash by Jerry Brito of the Coin Center non-profit. I highly recommend people watch it to understand why cash is important to preserve an open, liberal society.

https://www.youtube.com/watch?v=wmXDJpYF46E&fbclid=IwAR3tBKD...


seems like many self-driving car startups follow this model?


There is no such thing as a self-driving car, and there won't be for at least 20 more years.


thanks! that's clearly what the above comment was asking. . .


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

Search: