<story><title>I Was Wrong about Nix</title><url>https://christine.website/blog/i-was-wrong-about-nix-2020-02-10</url></story><parent_chain><item><author>acqq</author><text>&amp;gt; Today: Install Nix&lt;p&gt;I&amp;#x27;m missing something here. (Disclaimer: I&amp;#x27;ve just tried to understand the OP, I don&amp;#x27;t know all the details about what is going on there).&lt;p&gt;The text starts with &amp;quot;In my last post about Nix, I didn’t see the light yet.&amp;quot; ... Then it continues with &amp;quot;A popular way to model this is with a Dockerfile.&amp;quot; So I have expected that the post will demonstrate how Nix can be used &lt;i&gt;without&lt;/i&gt; docker... But then later:&lt;p&gt;&amp;quot;so let’s make docker.nix:&amp;quot;&lt;p&gt;and continues in that way. So there is some dockering involved? To this casual reader, it doesn&amp;#x27;t seem that using Nix allows one to avoid docker, as a technology, but just that some additional goal is achieved by using Nix over that.&lt;p&gt;I just missed what was actually achieved, other than that the text mentions a few megabytes less here or there, of 100 MB, and that I also miss the information if the megabytes were traded in the build time or, if I understand correctly, in some way even more dependencies (more places from which something has to download something). Can anybody explain?&lt;p&gt;I&amp;#x27;m sure that these tradeoffs were obvious to the author, but I as a reader hoped to somehow get the idea of those, and I missed that (yes, it&amp;#x27;s hard to &amp;quot;see the light&amp;quot; especially indirectly).</text></item><item><author>solatic</author><text>&amp;gt; Seriously, are we optimizing for the right stuff here? I know Nix is doing package isolation with a programmable environment defined by text files, it&amp;#x27;s immutable and all. I get it. But we have alternatives for these problems. They do a pretty good job overall and we understand them.&lt;p&gt;Setting up a development environment five years ago: here&amp;#x27;s a Word document that tells you which tools to install. Forget about updating the tools - good luck trying to get everyone to update their systems.&lt;p&gt;Setting up a development environment two years ago: here&amp;#x27;s a README that tells you which commands to run to build Docker images locally which will build and test your code. OS X users have fun burning RAM to the unnecessary VM gods when they have little to spare to begin with because MacBook Pros. No reproduceability between Dev and CI despite using container images because Dev will have debugging tools made available in the image that will be removed from the final image. Be limited while debugging locally because all debugging must happen over a network connection.&lt;p&gt;Today: Install Nix. Run build.sh. Run test.sh. Run nix-shell if you want more freedom.</text></item><item><author>nitrix</author><text>As much as I admire the people involved with Nix, taking the initiative to solve what they believe can be improved and the other developers like her, toying with new things and successfully managing to figure all this stuff out... I&amp;#x27;m actually disappointed.&lt;p&gt;The thing is, Nix is an absurdly complex piece of software, perhaps on a similar order of magnitude as maybe Kubernetes or other gizmos, requiring a very large time commitment to understand and to use properly.&lt;p&gt;Just for fun, have any of you tried to keep up during the Docker bigbang, with all these technologies popping up left and right, switching names, dying abruptly, getting super-seeded or hacked with vulnerabilities? That was one of my most mentally draining year for me and I&amp;#x27;ve been in the field for a while now.&lt;p&gt;See... along the way, I&amp;#x27;ve learned that Computer Science is always about tradeoffs. Now when I&amp;#x27;m being asked to trade away my sanity learning this nonsense for in return a couple of megabyte of disk space that could&amp;#x27;ve been wasted, I just don&amp;#x27;t see the value.&lt;p&gt;Seriously, are we optimizing for the right stuff here? I know Nix is doing package isolation with a programmable environment defined by text files, it&amp;#x27;s immutable and all. I get it. But we have alternatives for these problems. They do a pretty good job overall and we understand them.&lt;p&gt;Ironically, even those solutions I&amp;#x27;m comfortable with are still struggling to get good adoption! How the heck is our field going to avoid fragmentation when it keep growing exponentially like this.&lt;p&gt;Perhaps it&amp;#x27;s just me aging and getting groggy; though there must be an explanation for this phenomenon. Please, it definitely gnaws at me.</text></item></parent_chain><comment><author>otabdeveloper4</author><text>As a person that uses Nix to build Docker images in production, let me explain.&lt;p&gt;Docker is a tool that lets you package a Linux distribution and roll it out on any random server cleanly and safely. But the stuff inside that distribution is still very much bespoke and unmaintainable.&lt;p&gt;Nix is a tool that lets you create a custom Linux distribution with absolutely minimal effort. (Basically, just list your packages in a file and hit &amp;#x27;go&amp;#x27;.) But the packaging story for Nix is pretty bad.&lt;p&gt;To bridge that gap, Nix has code that puts a Nix package with all dependencies into a Docker container. It works, but of course kind of icky; something more integrated and smart would be preferred.</text></comment>
<story><title>I Was Wrong about Nix</title><url>https://christine.website/blog/i-was-wrong-about-nix-2020-02-10</url></story><parent_chain><item><author>acqq</author><text>&amp;gt; Today: Install Nix&lt;p&gt;I&amp;#x27;m missing something here. (Disclaimer: I&amp;#x27;ve just tried to understand the OP, I don&amp;#x27;t know all the details about what is going on there).&lt;p&gt;The text starts with &amp;quot;In my last post about Nix, I didn’t see the light yet.&amp;quot; ... Then it continues with &amp;quot;A popular way to model this is with a Dockerfile.&amp;quot; So I have expected that the post will demonstrate how Nix can be used &lt;i&gt;without&lt;/i&gt; docker... But then later:&lt;p&gt;&amp;quot;so let’s make docker.nix:&amp;quot;&lt;p&gt;and continues in that way. So there is some dockering involved? To this casual reader, it doesn&amp;#x27;t seem that using Nix allows one to avoid docker, as a technology, but just that some additional goal is achieved by using Nix over that.&lt;p&gt;I just missed what was actually achieved, other than that the text mentions a few megabytes less here or there, of 100 MB, and that I also miss the information if the megabytes were traded in the build time or, if I understand correctly, in some way even more dependencies (more places from which something has to download something). Can anybody explain?&lt;p&gt;I&amp;#x27;m sure that these tradeoffs were obvious to the author, but I as a reader hoped to somehow get the idea of those, and I missed that (yes, it&amp;#x27;s hard to &amp;quot;see the light&amp;quot; especially indirectly).</text></item><item><author>solatic</author><text>&amp;gt; Seriously, are we optimizing for the right stuff here? I know Nix is doing package isolation with a programmable environment defined by text files, it&amp;#x27;s immutable and all. I get it. But we have alternatives for these problems. They do a pretty good job overall and we understand them.&lt;p&gt;Setting up a development environment five years ago: here&amp;#x27;s a Word document that tells you which tools to install. Forget about updating the tools - good luck trying to get everyone to update their systems.&lt;p&gt;Setting up a development environment two years ago: here&amp;#x27;s a README that tells you which commands to run to build Docker images locally which will build and test your code. OS X users have fun burning RAM to the unnecessary VM gods when they have little to spare to begin with because MacBook Pros. No reproduceability between Dev and CI despite using container images because Dev will have debugging tools made available in the image that will be removed from the final image. Be limited while debugging locally because all debugging must happen over a network connection.&lt;p&gt;Today: Install Nix. Run build.sh. Run test.sh. Run nix-shell if you want more freedom.</text></item><item><author>nitrix</author><text>As much as I admire the people involved with Nix, taking the initiative to solve what they believe can be improved and the other developers like her, toying with new things and successfully managing to figure all this stuff out... I&amp;#x27;m actually disappointed.&lt;p&gt;The thing is, Nix is an absurdly complex piece of software, perhaps on a similar order of magnitude as maybe Kubernetes or other gizmos, requiring a very large time commitment to understand and to use properly.&lt;p&gt;Just for fun, have any of you tried to keep up during the Docker bigbang, with all these technologies popping up left and right, switching names, dying abruptly, getting super-seeded or hacked with vulnerabilities? That was one of my most mentally draining year for me and I&amp;#x27;ve been in the field for a while now.&lt;p&gt;See... along the way, I&amp;#x27;ve learned that Computer Science is always about tradeoffs. Now when I&amp;#x27;m being asked to trade away my sanity learning this nonsense for in return a couple of megabyte of disk space that could&amp;#x27;ve been wasted, I just don&amp;#x27;t see the value.&lt;p&gt;Seriously, are we optimizing for the right stuff here? I know Nix is doing package isolation with a programmable environment defined by text files, it&amp;#x27;s immutable and all. I get it. But we have alternatives for these problems. They do a pretty good job overall and we understand them.&lt;p&gt;Ironically, even those solutions I&amp;#x27;m comfortable with are still struggling to get good adoption! How the heck is our field going to avoid fragmentation when it keep growing exponentially like this.&lt;p&gt;Perhaps it&amp;#x27;s just me aging and getting groggy; though there must be an explanation for this phenomenon. Please, it definitely gnaws at me.</text></item></parent_chain><comment><author>Nullabillity</author><text>Nix itself doesn&amp;#x27;t use Docker, and you can deploy it like that just fine (with NixOS, and NixOps if you have multiple machines).&lt;p&gt;But sometimes your ops team has standardized on Docker, maybe because you&amp;#x27;re using Kubernetes. In that case, Nix will happily build those images for you.</text></comment>