Tangentially related, does anyone have experience with NixOS or Guix? I got a little curious to try NixOS yesterday but I have no idea if it's worth the time spent learning the Nix language.
My use case is I want to learn by setting up a home lab, basically just Linux hosting a NAS and a bunch of services in docker containers.
Nix sounds attractive because it has a declarative package manager, so that later if I wanted to expand this single system to a cluster, it'd be trivial to duplicate the system. And it'd let me play around with software without worrying about making sure it's all cleaned up when I'm done.
I wanted to go with arch due to familiarity, but I think rolling release is not a great idea for a server.
I've used NixOS for the better part of a year now and I really dig it. Having versions to roll back to means you can experiment and basically never fuck things up. Every package you could want is all ready to go. Guix looks pretty great as well, but just haven't gotten around to trying it yet.
NixOS is very interesting, but learning how to set up complex software (like Apache / Nextcloud / Postgres / Matrix (synapse) / etc) can be more time consuming than normal, since not only do you need to read the original manuals, but you also need to cross-reference them with the Nix manuals and oftentimes even the Nix packages themselves. Additionally, some problems which can be fixed with a quick workaround (i.e. GDM using the wrong monitor by default and showing the login prompt on a TV in the other room) become much harder / impossible to fix "The Nix Way(TM)" if there's no setting for you to adjust. When you make a mistake in your Nix scripts, the error tend to be very cryptic and not so helpful in my experience. Once you get something working the way you like though, it's pretty snazzy. The goal is that you invest extra effort up front configuring things, but this dramatically reduces the maintenance burden in the long run, but your milage may vary depending on how mature certain systems are.
After trying out NixOS for a couple months, I ended up returning to Gentoo. Also, don't use NixOps (a third party project). It is steaming trash.
I love Nix. Have used it in pretty much every device I can find for a couple of years now. It's really good for development projects because you can make a custom shell with all your tooling available without installing a ton of garbage system wide, and also without container/vm overhead. Home manager is also fun for desktop customization.
I think you'd find the Nix language easy to learn. There's decent guides, a repl to play with, and a lot of examples. You don't even need to fully understand the language to configure NixOS either. I'm pretty sure the NixOS tools can deploy configs to other machines directly over SSH, like Ansible does. You could use that to keep your cluster in sync from one machine, maybe with a CI hook.
The biggest issue with Nix is the confusing tooling. Right now, there is a big shift going on in the community to a new package management solution called Flakes. Flakes are great, but they don't yet have all of the features you might want and most documentation doesn't mention them yet. There's also the matter of Nix being like a little bit too flexible, so there's a lot of ways to do everything but no one correct way.
I've messed with NixOS coming from Arch. If I'd try again I'd do Guix just so I don't have to learn a new language. I also think Guix is rolling release and IIRC NixOS was really far behind on a lot of packages. If a distro is doing a standard release schedule they need to have a large team and community testing all their packages which Nix doesn't.
Docker and docker-compose basically negates the point of Nix. The only services you really care about are already declared and pinned in you're docker-compose.yml file. NixOS was a good idea but it's not something I'd want to tie myself to. If someone's going to come up with a declarative operating system it's going to be something like docker-compose-OS.
Tangentially related, does anyone have experience with NixOS or Guix? I got a little curious to try NixOS yesterday but I have no idea if it's worth the time spent learning the Nix language.
My use case is I want to learn by setting up a home lab, basically just Linux hosting a NAS and a bunch of services in docker containers.
Nix sounds attractive because it has a declarative package manager, so that later if I wanted to expand this single system to a cluster, it'd be trivial to duplicate the system. And it'd let me play around with software without worrying about making sure it's all cleaned up when I'm done.
I wanted to go with arch due to familiarity, but I think rolling release is not a great idea for a server.
I've used NixOS for the better part of a year now and I really dig it. Having versions to roll back to means you can experiment and basically never fuck things up. Every package you could want is all ready to go. Guix looks pretty great as well, but just haven't gotten around to trying it yet.
NixOS is very interesting, but learning how to set up complex software (like Apache / Nextcloud / Postgres / Matrix (synapse) / etc) can be more time consuming than normal, since not only do you need to read the original manuals, but you also need to cross-reference them with the Nix manuals and oftentimes even the Nix packages themselves. Additionally, some problems which can be fixed with a quick workaround (i.e. GDM using the wrong monitor by default and showing the login prompt on a TV in the other room) become much harder / impossible to fix "The Nix Way(TM)" if there's no setting for you to adjust. When you make a mistake in your Nix scripts, the error tend to be very cryptic and not so helpful in my experience. Once you get something working the way you like though, it's pretty snazzy. The goal is that you invest extra effort up front configuring things, but this dramatically reduces the maintenance burden in the long run, but your milage may vary depending on how mature certain systems are.
After trying out NixOS for a couple months, I ended up returning to Gentoo. Also, don't use NixOps (a third party project). It is steaming trash.
I love Nix. Have used it in pretty much every device I can find for a couple of years now. It's really good for development projects because you can make a custom shell with all your tooling available without installing a ton of garbage system wide, and also without container/vm overhead. Home manager is also fun for desktop customization.
I think you'd find the Nix language easy to learn. There's decent guides, a repl to play with, and a lot of examples. You don't even need to fully understand the language to configure NixOS either. I'm pretty sure the NixOS tools can deploy configs to other machines directly over SSH, like Ansible does. You could use that to keep your cluster in sync from one machine, maybe with a CI hook.
The biggest issue with Nix is the confusing tooling. Right now, there is a big shift going on in the community to a new package management solution called Flakes. Flakes are great, but they don't yet have all of the features you might want and most documentation doesn't mention them yet. There's also the matter of Nix being like a little bit too flexible, so there's a lot of ways to do everything but no one correct way.
I've messed with NixOS coming from Arch. If I'd try again I'd do Guix just so I don't have to learn a new language. I also think Guix is rolling release and IIRC NixOS was really far behind on a lot of packages. If a distro is doing a standard release schedule they need to have a large team and community testing all their packages which Nix doesn't.
Docker and docker-compose basically negates the point of Nix. The only services you really care about are already declared and pinned in you're
docker-compose.yml
file. NixOS was a good idea but it's not something I'd want to tie myself to. If someone's going to come up with a declarative operating system it's going to be something like docker-compose-OS.