Live data from Hacker News

NixOS 22.11 “Raccoon”

nixos.org

71–80 of 201 posts

Re: NixOS 22.11 “Raccoon”

#71
post #43

Though I've liked NixOS in the past, the documentation is an absolute mess. I've switched to GNU Guix.

As someone just getting started with Nix & NixOS, I couldn't agree more. In terms of documentation: the lines between nix-the-language, nix-the-tool, and nixos-the-system are often too blurry. Familiarity with one of the three is often assumed or implied. Everyone seems to be using Flakes and/or home-manager; the official docs and tools all try to scare you away by labeling it unstable/experimental (if ever mentionin…

The lines are often blurry because they are quite interlacing and all where purpose build for each other.

> python310.withPackages and python311.withPackages

I think that should be solvable by supplying them the same function.

env = ps: with ps; [ numpy toolz ] python39.withPackages(env) python310.withPackages(env)

Re: NixOS 22.11 “Raccoon”

#72

Though I've liked NixOS in the past, the documentation is an absolute mess. I've switched to GNU Guix.

I want to use the expensive hardware I own and from the few examples I have seen guix is incredible verbose often requiring two to three times the code to express the same thing as nixpkgs.

Re: NixOS 22.11 “Raccoon”

#73
post #35

Earlier quoted context omitted.

> learn both the nix language That seems weird to me. I don't have to learn package configuration language in other distributions. I thought that one could just install packages with a package manager. > You can use nix-alien[2] which will automatically fetch the required libraries and build an FHS shell for the binary. That's actually fine. I want to put closed source software into a chroot anyway.

If you want to run nixos (i.e. the linux distro) then the configuration file is written in the nix language. Given that you’ll have to configure your installation, you’ll have to learn the nix language If you just want to use nix for packages, you can run any distro and install nix the package manager into it. This is a good way to dip your toes in the water. And in that case you can just use the cli commands for ins…

I remember reading that nix unlike all other distros can install multiple version of the same package and I want this feature, but I guess programming a package config might be too much for me. Maybe I'll try nix package manager then.

Re: NixOS 22.11 “Raccoon”

#74

My router (a VM with passed through network card) is currently running on NixOS, I’m really happy so far, it makes kernel patching (which in my case is required for the nic to work properly at 2500BASE-T) much easier than manually patching and building the kernel every time. It also gives me the guarantee that I will be able to rebuild the exact same host almost bit by bit in the future, in case of necessity, which i…

Yeah I used to use pfSense but hated having a load of config and firewall rules created manually, it all felt quite brittle. Moved to NixOS almost 5 years ago now and haven’t looked back, my router config is in Git and I’m able to make changes with confidence. Best part is making a change/installing an update and being able to rollback if I mess something up. I also use Nixus to push new configs which has a nifty fea…

Can you share your router configs? I'd love to have a NixOS based router.

Re: NixOS 22.11 “Raccoon”

#76
post #58

Earlier quoted context omitted.

nixpkgs is already one of the largest package collections. There is a good chance your software is already included. The nix language itself is pretty straightforward and if you know haskell your should feel straight at home. You shouldn't use nixpkgs python packages as a replacement for your python development. That would also not work that great on other distros.

> nixpkgs is already one of the largest package collections. There is a good chance your software is already included. Yes, but that still doesn't solve this: > Major problems: installing niche proprietary software that you may have to package yourself If some software _isn't_ packaged, it's a pain in the butt to get it running on NixOS. Either you have to create Nix derivations, which have a pretty steep learning cu…

Creating a basic nix derivation is easy and if you don't want to upstream it you can take all kinds of dirty and impure shortcuts.

You almost never want to invoke patchelf by itself but use some wrapper like autoPatchelfHook, FHS, nix-ld, nix-autobahn, etc.

Since 2018 a lot quite a lot happened. Give it another chance.

Re: NixOS 22.11 “Raccoon”

#77

My experience with NixOS: Package installation is usually just from the official channel, system options can usually be done with `/etc/nixos/configuration.nix` and home-manager. Major problems: installing niche proprietary software that you may have to package yourself, and fighting Nix for languages with package manager, e.g. Python, which frequently uses packages not in nixpkgs.

I wouldn't call them major problems. There are workarounds for running things without much effort if you want, e.g. FHS or steam run or distro box. For Python, you can create a virtual env and use it like any other machine.

And if you do put in the effort to make a package, you'll never have problems figuring out how to install it in the future, and can share that gain with others.

Making packages for nix is way easier than making debs or rpms in my experience.

Re: NixOS 22.11 “Raccoon”

#78

Earlier quoted context omitted.

> That seems weird to me. I don't have to learn package configuration language in other distributions. I thought that one could just install packages with a package manager. NixOS is more like a distro bundled with Ansible, so you can describe your entire system as code.

but in contrast to ansible it uses a real programming language and not turing complete yaml

And it's reproducible since the entire system is built with it. Ansible is brittle as hell.

Re: NixOS 22.11 “Raccoon”

#79
post #58

Earlier quoted context omitted.

nixpkgs is already one of the largest package collections. There is a good chance your software is already included. The nix language itself is pretty straightforward and if you know haskell your should feel straight at home. You shouldn't use nixpkgs python packages as a replacement for your python development. That would also not work that great on other distros.

> nixpkgs is already one of the largest package collections. There is a good chance your software is already included. Yes, but that still doesn't solve this: > Major problems: installing niche proprietary software that you may have to package yourself If some software _isn't_ packaged, it's a pain in the butt to get it running on NixOS. Either you have to create Nix derivations, which have a pretty steep learning cu…

It's more a story of, you have to do some hackery patchelf business, but creating a Nix derivation helps you do just that.

The unfortunate part is that creating a Nix derivation is no more approachable than the patchelf hackery was in the first place.

Re: NixOS 22.11 “Raccoon”

#80
post #58

Earlier quoted context omitted.

> nixpkgs is already one of the largest package collections. There is a good chance your software is already included. Yes, but that still doesn't solve this: > Major problems: installing niche proprietary software that you may have to package yourself If some software _isn't_ packaged, it's a pain in the butt to get it running on NixOS. Either you have to create Nix derivations, which have a pretty steep learning cu…

Creating a basic nix derivation is easy and if you don't want to upstream it you can take all kinds of dirty and impure shortcuts. You almost never want to invoke patchelf by itself but use some wrapper like autoPatchelfHook, FHS, nix-ld, nix-autobahn, etc. Since 2018 a lot quite a lot happened. Give it another chance.

It's only way when you know how. It's quite difficult to learn.
Post reply on HN