Hacker News new | ask | show | jobs
by Aaronmacaron 892 days ago
I used to run NixOS on my main computer for a few months until I encountered some situation that I couldn't resolve using my nix skills. I think I needed to run some software that wasn't on nixpkgs.

Nowadays, I just use nix (the package manager) on top of PopOS.

3 comments

This has always been the death of any attempt I make at using NixOS. The first time I tried over a decade ago I think it was VMWare Workstation, then CLion or some other Jetbrains package a few years later - things that aren't particularly esoteric to linux users. Completely opposite the experience that I've had with ArchLinux.

Maybe I should give it another shot if ChatGPT can provide better guidance than reading a dozen blog posts, 11 of which are out of date.

Checking nixpkgs now, it looks like the entire suite of Jetbrains tools are well-supported (except for the newest one, Fleet, since it looks like the people who tried ran into some issues they didn't know how to solve), as well as VMWare Workstation.

Coming from Arch, almost every package I want is on NixOS. The couple I can remember that weren't there are Android Studio for Platform (I packaged it myself following the derivation for the regular Android Studio), Obsidian.nvim (which was packaged a week or two after I mentioned it), and there's been a couple smaller tools that I can't remember.

According to the Github issue [1] they added VMWare Workstation in 2022 so the ship has long sailed. Last time I tried (2020 I think) I also couldn't get Xilinx installed and that was just the first in a long list of tools. Even now it requires an FHS workaround.

NixOS is great if you never tread from the happy path but it seems most of my work requires tools way off the happy path.

[1] https://github.com/NixOS/nixpkgs/issues/56814

TBH every linux disto will sometimes leave the happy path. The difference between nixos and basically all other distros is that all other distros at least do most thing somewhat in the same way. So even an install for example for Ubuntu can relatively easily be translated to Arch. But that's unfortunately not the case with nixos. It's just too different. So once you are off the happy path you sometimes need real skill in nix to even do some, at first glance, simple things.
In my experience ChatGPT learns from those 11 out of date blog posts, and merges it all into a totally wrong mess. At least I didn't have much luck with solving nix problems with chatgpt.
I'd say that chatgpt can solve half of the nix problems that I bother confront it with. Half of them it solves it on the first go, for the remainder I have to go back and forth with it for 4x longer than it would have taken me to solve it on my own.

Typically these are troubleshooting a flake for a project. I think it works because flakes are nice and self contained: you can paste the whole flake. I find it does significantly worse when trying to help with contributions to nixpkgs, presumably because the context is not bite sized.

nixpkgs is (and has been for many years now) by far the largest and most up to date package collection of any linux distribution (including the air).

ref: https://repology.org/

This is misleading. Because nixpkgs repackages all of npm, pip, hackage etc. packages. Stuff that on other distros are managed by their respective tools seperate from the distro packaging. Still nixpkgs is pretty vast.
Not misleading. Othet distros do similar or even the same. For example many if not all python modules are separate packages.

Even so. Removing the packages you talk about Nix is still largest. So again not misleading.

It's definitely misleading because nixpkgs takes it to an extreme: https://github.com/NixOS/nixpkgs/tree/master/doc/languages-f...

Most Haskell packages are not included in the AUR and haskellPackages alone makes up over 17,000 packages on nixpkgs compared to ~1,100 on AUR - subtract just that and Arch pulls ahead. Nixpkgs also has almost twice as many Python packages because python310Packages is separate from python311Packages.

I bet there are lots of other non-language examples too: a quick search found emacsPackages which contains six thousand packages.

Showing that there are smaller scoped packages does not prove your point.

You have to prove that it has less of the software available on other distros. Even if you could find a billion small packages that represents only a single package in every distro this is not evidence or a proof that support your claim.

Simply put, you need to show where nix does not have a larger number of packages that are available on other distros.

Given that nix is mostly automated and pulls from the same root sources as every other distro you are going to be hard pressed to find a significant number of cases where nix lacks a package.

Not misleading.

For other people in this situation of running Nix the package manager on a non-Nix OS, a nascent Numtide project you may be interested in is system-manager:

https://discourse.nixos.org/t/github-numtide-system-manager-...

The idea is to provide some of the NixOS whole-system management niceties (especially controlling systemd units) but on non-NixOS systems like Ubuntu, in a way that behaves more like puppet/chef/ansible rather than competing with the native package manager.

I ran into this situation when I needed Conda (for work).. But I may have found a solution: Distrobox (Conda expects certain folders in certain places and NixOS folders are all random strings.)