Live data from Hacker News

My experience with NixOS

blog.patchgirl.io

11–20 of 95 posts

Re: My experience with NixOS

#11
post #3

Forgive me for using buzzwords, but what's the "cloud native" story on NixOS? Can I easily create containers and update my orchestrator's deployment? Can I abstract things like AWS Lambdas into this immutable build structure?

Not having used it, maybe NixOps is the thing you want.

Re: My experience with NixOS

#12
post #2

NixOS is good, if you found not enough documentation, try Guix and may be GuixSD. It uses guile (scheme) and has fantastic documentation. [1] Earlier Nix had additional NixOps but that too now is available with Guix deploy. I am waiting when I can run Guix within a lxd container, shepherd init still has some rough edges with LXD container init. Both are great piece of software and a new take on building OS and distri…

Guix looks really cool. I wish that it used Lisp rather than Scheme (because IMNSHO Lisp is better-suited to this kind of system software), but that ship has sailed.

It’s a real shame that rms had such a dislike of Common Lisp. The mind boggles at where the cutting edge of computing would be today had Emacs upgraded from Elisp to Common Lisp twenty or thirty years ago. Instead GNU has spent 27 years trying to turn Scheme into a sufficient systems programming language, once again illustrating the truth of Greenspun’s Tenth Law: Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp. I would add a corollary: this also applies to any sufficiently complicated Scheme program.

Re: My experience with NixOS

#13
post #4
post #2

NixOS is good, if you found not enough documentation, try Guix and may be GuixSD. It uses guile (scheme) and has fantastic documentation. [1] Earlier Nix had additional NixOps but that too now is available with Guix deploy. I am waiting when I can run Guix within a lxd container, shepherd init still has some rough edges with LXD container init. Both are great piece of software and a new take on building OS and distri…

How is Shepherd broken with LXC? Is it sufficient to run Guix atop another distribution, or run Guix SD in a qemu VM?

GuixSD does not work without making changes within a LXD container (not VM). One of the details on how to do it is in mailing list. [1]

[1] https://lists.gnu.org/archive/html/help-guix/2018-10/msg0006...

Re: My experience with NixOS

#14
post #2

NixOS is good, if you found not enough documentation, try Guix and may be GuixSD. It uses guile (scheme) and has fantastic documentation. [1] Earlier Nix had additional NixOps but that too now is available with Guix deploy. I am waiting when I can run Guix within a lxd container, shepherd init still has some rough edges with LXD container init. Both are great piece of software and a new take on building OS and distri…

Our organization tried Nix for many years. Most of our problems were around usability, lack of documentation (including zero docstrings or type annotations in nixpkgs), and the overt unfamiliarity of the Nix expression language (asking a whole organization to learn something that seems deliberately cryptic isn't a recipe for success), and a long tail of other things. Still, at its core Nix for package management seem…

My problem with Nix was not the language, but the very confusing CLI and the way updates were done (nix-channel) and the difficulty of pinning dependencies or documenting how to do that. However, they have been hard at work at a nix CLI 2.0 which is much better, and a new uddating mechanism that is way easier to understand: https://github.com/NixOS/rfcs/pull/49

This gives me hope things are getting better.

Also recently I funded a project for improving error messages in Nix https://opencollective.com/nix-errors-enhancement

Ther is also now a dedicated Nix Marketing team which are working on improving the website and the documentation

Re: My experience with NixOS

#15
I moved to NixOS the other week and love it. Being able to play about and roll back to previous configurations is honestly amazing once you get into a position that you need it. I tinker with my OS and this happens more often than I’d care to admit!

Nix as a build tool is also quite nice, but honestly NixOS is the main attraction for me.

Re: My experience with NixOS

#16
post #5
post #3

Forgive me for using buzzwords, but what's the "cloud native" story on NixOS? Can I easily create containers and update my orchestrator's deployment? Can I abstract things like AWS Lambdas into this immutable build structure?

You can build docker images with Nix ( https://nixos.org/nixpkgs/manual/#sec-pkgs-dockerTools ), but right now it wouldn't make much sense to use the NixOS modules (like nginx) for that. The modules in NixOS assume a systemd based environment and are thus not suitable for use in containers (in the end, most service modules generated systemd units). What you can do, though, is use Nix to build a container image with a…

We are using Continix[0] to package up regular NixOS modules in docker

[0] https://github.com/notgne2/continix

Re: My experience with NixOS

#17
post #3

Forgive me for using buzzwords, but what's the "cloud native" story on NixOS? Can I easily create containers and update my orchestrator's deployment? Can I abstract things like AWS Lambdas into this immutable build structure?

I would say Nix's cloud native story is "best in class".

you can take any nixos configuration and turn it into a cloud image https://github.com/nix-community/nixos-generators

You can take any nix package and turn it into a docker image https://news.ycombinator.com/item?id=20720922 https://news.ycombinator.com/item?id=18111954

You can even use Nix to create and deploy cloud resources ala Terraform:

github.com/nixos/nixops

Some other notable uses of Nix in cloud native landscape:

https://github.com/saschagrunert/kubernix - a KIND alternative

https://github.com/xtruder/kubenix a Nix DSL for defining and deploying entire kubernetes clusters + deployments (combines nix's docker image building support and deployment support for and end to end cloud-native solution)

I personally think Nix should heavily market itself to the CLoud Native buzzword hype train. as it's my favourite weapon in this space

Re: My experience with NixOS

#18
post #2

NixOS is good, if you found not enough documentation, try Guix and may be GuixSD. It uses guile (scheme) and has fantastic documentation. [1] Earlier Nix had additional NixOps but that too now is available with Guix deploy. I am waiting when I can run Guix within a lxd container, shepherd init still has some rough edges with LXD container init. Both are great piece of software and a new take on building OS and distri…

I don't see why you say that NixOS does not have enough documentation, a commonly cited problem is the lack of tooling rather than the lack of documentation which would be fair. NixOS has the most extensive documentation out there for any linux distribution which I've used [0] and each package is documented and contains the information of any option it offers from the nix code itself and the tooling [1].

Furthermore I do not think you can compare Guix to Nix for commercial work as Nix is LGPL [2] with the packages being MIT [3] where Guix is GPL [4] allowing for Nix derivative work to be used commercially with little restriction.

I wish Guix had stayed as a guile layer for Nix and not gone off in its own direction because of the licensing ambiguity (as far as I can tell this is the reason) in Nix packages. If anyone has more insight on why this split happened or the possibility of making such layers for Nix I'm very interested in this topic.

[0] https://nixos.org/learn.html [1] https://nixos.org/nixos/packages.html?channel=nixos-19.09 [2] https://github.com/NixOS/nix#license [3] https://github.com/NixOS/nixpkgs/blob/master/COPYING [4] https://guix.gnu.org/about/

Re: My experience with NixOS

#19

Earlier quoted context omitted.

Our organization tried Nix for many years. Most of our problems were around usability, lack of documentation (including zero docstrings or type annotations in nixpkgs), and the overt unfamiliarity of the Nix expression language (asking a whole organization to learn something that seems deliberately cryptic isn't a recipe for success), and a long tail of other things. Still, at its core Nix for package management seem…

To me, this is a success story; your organization wasn't sufficiently flexible to adopt new technologies which require rethinking the fundamentals of package management. Take this as a warning sign and re-orient your organization. I do wonder about the "deliberately cryptic" nature of Nix's expression language. It is, in fact, deliberately designed for simplicity, to be a basic syntax for a language that is purely fu…

Do you have any evidence to support your assertion that it was an issue with an organisation rather than the technology?

Not all technologies are good. Not all organisations are good. Sometimes it's one. Sometimes it's the other.

Re: My experience with NixOS

#20
post #3

Forgive me for using buzzwords, but what's the "cloud native" story on NixOS? Can I easily create containers and update my orchestrator's deployment? Can I abstract things like AWS Lambdas into this immutable build structure?

I would say Nix's cloud native story is "best in class". you can take any nixos configuration and turn it into a cloud image https://github.com/nix-community/nixos-generators You can take any nix package and turn it into a docker image https://news.ycombinator.com/item?id=20720922 https://news.ycombinator.com/item?id=18111954 You can even use Nix to create and deploy cloud resources ala Terraform: github.com/nixos/ni…

I switched to using Pulumi from NixOps because of the lack of tooling in the Nix ecosystem (also NixOps is frequently broken in all sorts of ways due to not having as large a community). Is there some ideal way to work with it to get it to behave without having to make your own tooling or would you consider my approach to instead create support for Nix in Pulumi (which I have not done as of yet but there are terraform packages so I'm hopeful on the feasibility of this project)?
Post reply on HN