Live data from Hacker News

NixOS: Declarative Builds and Deployments

nixos.org

11–20 of 83 posts

Re: NixOS: Declarative Builds and Deployments

#12
post #6

I like the idea of nixos. Having one file responsible for all packages installed on the system is way better than what traditional distro use. I just don't like the quality of the packages. It would be nice if someone could do something like a os wide packages.json but for a mature packages repository like Debian.

[flagged]

Re: NixOS: Declarative Builds and Deployments

#13
post #6

I like the idea of nixos. Having one file responsible for all packages installed on the system is way better than what traditional distro use. I just don't like the quality of the packages. It would be nice if someone could do something like a os wide packages.json but for a mature packages repository like Debian.

Alpine linux has a /etc/apk/world which is just a full list of all the packages currently installed

I'm not a fan of nix but I'd say the nixos repository is fairly mature.

Re: NixOS: Declarative Builds and Deployments

#14

Honestly, I don’t really understand the advantages (or the point of) NixOS over something like Docker.

you know how if you edit the first line of a 50 line docker file you gotta sit there forever to rerun the entire build? You don't have that issue with Nix.

You know how a Docker file barely has any structure, leading to a lot of bashisms to try and script certain behaviors? Nix doesn't have that issue.

NixOS is an OS you can configure with Nix. A lot less "OK so edit these files to try and configure something, then reboot", a lot more "configure this data structure, then reboot". Makes your system configuration mostly be in the same place, as NixOS will distribute these changes across the file system as needed to get things working. It's pretty nice!

Overall... it ends up being a bit easier to document why you're doing something in a Nix file relative to a Dockerfile, and caching and the like works much more smartly (lots less "move all this stuff to the top/bottom for caching reasons" you might do in a Dockerfile)

("Nix" here means "nix + nixpkgs", which is important since lots of nix-ism are basically downstream of how nixpkgs is written and the patterns used there)

Re: NixOS: Declarative Builds and Deployments

#15
post #6

I like the idea of nixos. Having one file responsible for all packages installed on the system is way better than what traditional distro use. I just don't like the quality of the packages. It would be nice if someone could do something like a os wide packages.json but for a mature packages repository like Debian.

[flagged]

What is your preferred alternative?

Re: NixOS: Declarative Builds and Deployments

#16
post #6

I like the idea of nixos. Having one file responsible for all packages installed on the system is way better than what traditional distro use. I just don't like the quality of the packages. It would be nice if someone could do something like a os wide packages.json but for a mature packages repository like Debian.

Alpine linux has a /etc/apk/world which is just a full list of all the packages currently installed I'm not a fan of nix but I'd say the nixos repository is fairly mature.

nixpkgs is (and has been for many years) the largest and most up to date package set by a very large margin.

source: https://repology.org/

Re: NixOS: Declarative Builds and Deployments

#17

Honestly, I don’t really understand the advantages (or the point of) NixOS over something like Docker.

NixOS is also a declarative build of the entire machine as opposed to just a container also, so it's totally normal to have a NixOS build with multimedia apps, games, etc. To me, Docker is for building an entire environment for a single app to run in, whereas NixOS is for building an environment that runs multiple apps. Like a microservice vs a desktop machine.

> so it's totally normal to have a NixOS build with multimedia apps, games, etc

Every time I try NixOS on a desktop with anything more complex than setting a couple flags (writing some derivations to work around the broken software, managing my dotfiles etc), my configuration ends up as an unholy mix of weird Nix trickery, FHS paths in a non-FHS environment, and foreign config includes. It's like writing (programming) your Emacs config by patching the existing one with a Python script, for twice the fun. Of course it also needs to be versioned and documented to keep track of it, otherwise what's the point.

I can't help but think that the Arch approach (make the system management transparent, close and personal, and ignore the burning trashcan) is infinitely easier for personal usage than the Nix approach (describe everything with an additional layer of indirection). It's probably the opposite for huge deployments, of course.

Re: NixOS: Declarative Builds and Deployments

#18

I first looked at nix-shell which you can use to create ephemeral environments just like Docker, with the difference that they are 100% reproducible and you don't need containerd or like. It is awesome to create scripts which run the same on EVERY system. Then looked at NixOS. I geht the point of having a deklarative like OS which you can rebuild in a couple of minutes, BUT the nix language is kind of unituitive and…

> It does not help that the docs are kind of meh

In my experience, they’ve improved massively over the last few years.

Most of the time, the docs directly explain how to solve some problem I have while also giving good context. I recently was messing with my boot loader and the docs were perfect

Re: NixOS: Declarative Builds and Deployments

#19
post #6

I like the idea of nixos. Having one file responsible for all packages installed on the system is way better than what traditional distro use. I just don't like the quality of the packages. It would be nice if someone could do something like a os wide packages.json but for a mature packages repository like Debian.

Which package did you have issues with?

I think I remember having issues with the Kate package. There might have been others but that's the one that stuck for me.

Re: NixOS: Declarative Builds and Deployments

#20

Honestly, I don’t really understand the advantages (or the point of) NixOS over something like Docker.

Docker= issues / hacks with file/user permissions, More storage requirements, Additional hacks needed for gui to work

But I'm yet to use NixOS, so i don't know what it's downsides are..

Post reply on HN