Earlier quoted context omitted.
It's kind of a mess. Nix is a collection of tools and systems that together form a highly reproducible build system. Nix is also a declarative, largely pure and lazy programming language that you use to design and specify the different build outputs for the Nix build system. Nixpkgs is, more or less, the only project written using Nix (and a lot of shell). It's a collection of many thousands of "derivations", many of…
I've had the (dis)pleasure of working with several projects that have been built by developers that have religion around Nix. These projects were contract work where the client paid a significant amount of money, and the final product was really poor quality. One of them is a financial application that has strict security requirements, so having a reproducible build system and some of the other qualities of Nix sound…
What Is Nix?
211–220 of 344 posts
Re: What Is Nix?
#212This article is a good explanation of how nix works at a high level, and I'm excited to see nix getting some really prominent support, but for some reason it never tells you what the point of all of this is, so I think many folks might feel turned off by it. In other words, I don't believe it ever compellingly answers the question that constitutes its title. The word "package" doesn't even appear until near the end o…
Isn’t that the same goal as Docker? I’m surprised there’s still no Docker base image for NixOS...
Re: What Is Nix?
#213This article is a good explanation of how nix works at a high level, and I'm excited to see nix getting some really prominent support, but for some reason it never tells you what the point of all of this is, so I think many folks might feel turned off by it. In other words, I don't believe it ever compellingly answers the question that constitutes its title. The word "package" doesn't even appear until near the end o…
So... statically compiled executables? Wasn't that tried long ago and it was determined that the user should be able to choose when to upgrade dependencies, such as if a dependency needs an out-of-band update to work on the localhost OS?
Re: What Is Nix?
#214This article is a good explanation of how nix works at a high level, and I'm excited to see nix getting some really prominent support, but for some reason it never tells you what the point of all of this is, so I think many folks might feel turned off by it. In other words, I don't believe it ever compellingly answers the question that constitutes its title. The word "package" doesn't even appear until near the end o…
So... statically compiled executables? Wasn't that tried long ago and it was determined that the user should be able to choose when to upgrade dependencies, such as if a dependency needs an out-of-band update to work on the localhost OS?
Re: What Is Nix?
#215I loathe to be so critical, but I have no idea what this is. I'm sorry to say but this is a bad article - either that - or nix itself is a mishmash of things impossible to explain. I just see red flags everywhere. If it's 'A' - then maybe take some time to do a high-level introduction and some context. - 'Everything depends on something else' - really? Most 'installed software' doesn't depend on a whole lot else. Doe…
> - 'Everything depends on something else' - really? Yes. Really. > Most 'installed software' doesn't depend on a whole lot else. Yes it does. Your ignorance of this fact does not make this any less a fact. > Does the author really mean server software? Development environment? All of it.
But no, people around are really do have serious challenges with language sometimes.
Here's some help:
The vast majority of software that users install on their computers depends only on what the user would perceive as the 'OS' itself. For example, if one were to install 'some app' that works for Mac OSX version X.X and later, there wouldn't be any contemplation of 'dependencies', to the point wherein the vast majority of users wouldn't even grasp the concept.
Granular package or system-level dependencies are something that only developers are aware of.
Of course, the fact that nobody but developers would contemplate 'dependencies' should be obvious to anyone who interacts with regular people.
Re: What Is Nix?
#216Re: What Is Nix?
#217Re: What Is Nix?
#218This article is a good explanation of how nix works at a high level, and I'm excited to see nix getting some really prominent support, but for some reason it never tells you what the point of all of this is, so I think many folks might feel turned off by it. In other words, I don't believe it ever compellingly answers the question that constitutes its title. The word "package" doesn't even appear until near the end o…
What I'd really like to see is a realistic, end-to-end tutorial for either 1) deploying a relatively straightforward web application (like Dokuwiki or ZNC), or 2) setting up a basic desktop for day-to-day use. I feel like I've seen a lot of "snippets", I feel like I understand how Nix works and what it's supposed to be good for, but I don't have a coherent sense of the steps involved in actually using it for mundane…
We started to work on making official guides for common Nix tasks, about how to get a development environment set up, how to build a Docker image… focus is on the DevOps side at the moment, not so much on the desktop user, as we see that as the most valuable use case. This is part of the work of the NixOS marketing team to facilitate adoption of Nix into the mainstream.
Have a look at https://nix.dev/ for the first guides being worked on – pretty barebones so far, but we are aware and working on it.
Re: What Is Nix?
#219Earlier quoted context omitted.
> - 'Everything depends on something else' - really? Yes. Really. > Most 'installed software' doesn't depend on a whole lot else. Yes it does. Your ignorance of this fact does not make this any less a fact. > Does the author really mean server software? Development environment? All of it.
I thought this was satire when I first read it. But no, people around are really do have serious challenges with language sometimes. Here's some help: The vast majority of software that users install on their computers depends only on what the user would perceive as the 'OS' itself. For example, if one were to install 'some app' that works for Mac OSX version X.X and later, there wouldn't be any contemplation of 'dep…
Is it perhaps lost on you that the vast majority of people discussing this technology are developers?
And you accuse me of having serious challenges with language. Yikes.
> The vast majority of software that users install on their computers depends only on what the user would perceive as the 'OS' itself
Yes. And those dependencies are implicit. You know, exactly as the article describes.
> to anyone who interacts with regular people
This is a thinly-veiled ad-hominem argument. Does this approach of snootiness and condescension normally work for you when interacting with “regular people”?
Re: What Is Nix?
#220Earlier quoted context omitted.
So, there is no /nix/etc - anything in /nix is immutable. I haven't done this and hopefully someone will correct me if I get the details wrong, but I think the way you'd make this work within nix is you'd make your own package, let's call it "my-sshd-config," and it depends on a certain version of sshd. Then you'd have /nix/store/abcd1234-my-sshd-config-1.0/etc/sshd_config. (where "abcd1234" is a hash of everything i…
Oh dear... so you have to write a Nix package (and learn how the language and package management work) just to modify global config files, instead of just editing them? That sounds like an absolute nightmare for a local machine, though possibly a great tool for automated systems. Also, if there's no /nix/etc... then what is Nix modifying? sshd (or any other more common program; I'm just using sshd as an example to un…
A more common use would be to install a package in a version that isn't available, or where you would need to link to a different version of the library than is available on your system. Nix makes the dreaded autotools dance much more bearable, even for someone like me who doesn't really know any C++.
Another common situation is when you are a software developer working on many projects with overlapping but slightly different dependencies where slightly different sometimes turns out to be incompatible. Ideally you could handle this with `virtualenv` or your language's equivalent, but I often find I end up with multi-language projects where this just doesn't work. For example, if one of my Python libraries also wants some C libraries in a particular version. Nix is ideal for such a situation.
Docker and docker-compose can work too, but, eh, it's kind of slow, and it'll probably break a few months down the line when all the JavaScript library authors decide that building things with `plink` is gauche and everyone should move to `smooch` instead, or when CRAN decides it doesn't want to keep these old versions of libraries any more.
And, what do you do about your linting and formatting and code completion tools? Do those go inside Docker too, because then the Docker slowness really shows up.
(If you don't have these sorts of problems often, then Nix may not help you all that much. I guess reducing the amount of stuff you install and uninstall with `apt` or `rpm` probably still reduces the rate at which your system rots though.)
Having said all that, if you decided that you did want to use Nix to provide packages for your system services, then there's no difficulty in specifying a mutable config file in /etc/wherever. That part would be handled in your init system config (say, a systemd unit) instead of inside Nix.
It's for NixOS that you would use the Nix language to configure everything, and I've found that experience to vary quite a lot.
I've used some obscure or packages which didn't expose enough of the configuration to do what I needed by default, and so I had to make my own version. This can be pretty annoying and time consuming.
Nixpkgs' maintainers get a lot of work done individually because of the tooling, but there just aren't enough of them yet.
On the other hand, I've found that configuring popular things like Nginx and Postgres is often much easier in the Nix language.
It's much harder to make a small syntax error, you have access to some helpful templating constructs, and you can re-use the same constants for different config files in different packages.
Similarly, for NixOS, configuring your systemd services is really well handled.
Wow, that ended up long winded. Sorry.