this post was submitted on 20 Aug 2023
675 points (85.7% liked)
linuxmemes
21146 readers
1340 users here now
Hint: :q!
Sister communities:
- LemmyMemes: Memes
- LemmyShitpost: Anything and everything goes.
- RISA: Star Trek memes and shitposts
Community rules (click to expand)
1. Follow the site-wide rules
- Instance-wide TOS: https://legal.lemmy.world/tos/
- Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
- Understand the difference between a joke and an insult.
- Do not harrass or attack members of the community for any reason.
- Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
- Bigotry will not be tolerated.
- These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
3. Post Linux-related content
- Including Unix and BSD.
- Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of
sudo
in Windows. - No porn. Even if you watch it on a Linux machine.
4. No recent reposts
- Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
Please report posts and comments that break these rules!
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
NixOS: from where I am, you're indistinguishable
Nix is great. But I don't think I'd want to use it for a desktop OS base.
(Disk space/cycle life potential, binary cache misses, broken packages, and complete incompatibility with everything else. User error, TBH, but also stuff that's not really a problem with other systems. Well worth it as a package manager, though.)
Are you saying that having a Debian base system but exclusively installing with nix is the way to go?
I'm saying that's a way I might personally consider going if I were to set up a new computer. Rock solid base that you can still get normal packages and binaries to run on without much hassle if needed, plus Nix with more up-to-date packages that you can customize however you find most useful.
Personally I have a mix of rolling/regular repos, AUR, Nix, Flatpak, and static binaries. They all have their uses, TBH.
I've been using it on various desktops, as a PM but mostly the full OS for 6 years or so. I would hate to switch back.
Disk space is an issue... I've seen the OS take as much as 100 GB. But in a world of 2TB SSDs for $100, is that a big deal?
I don't see why NixOS would be any worse for the lifetime of a disk than other distros.
I've only hit binary cache missed for packages I created, or where I changed build options. IOW: a binary cache miss means Debian wasn't gonna have it anyway. And on the flip side: you can change package build options! Neat!
Broken packages are, if anything, less of a problem with Debian. Debian has lots of packages that are...not broken, but incomplete, requiring lots of manual config or whatever. NixOS is way better at that stuff.
User error? Yeah, fair. I'm a programmer by trade, but I can definitely see how it'd be a bit much if I weren't.
But oh man...you should've seen how trivial it was to switch from PulseAudio to PipeWire (including Jack support etc), leaving no trace that Pulse was ever installed... Or switching from X to Wayland, on a system that I've been doing rolling updates on since 2017, all with a clear conscience... It's beautiful.
Yes? Storage used for the OS is space not used for projects, entertainment, docs, redundancy, snapshots, avoiding fragmentation (EXT4), etc. Money spent on SSDs is money not spent on going out, food, meeting people, basic needs, other hardware, etc.
Untested, but I'd assume high space use combined with high update frequency, plus occasional builds-from-source and multiple simultaneous package versions, means more disk writes.
Biased, maybe, because manual GC means you see disk use tick up more than in other package managers, and also because I personally repeatedly rebuilt a custom gigabyte-sized Derivation dozens/hundreds of times. But I think it's a reasonable point of caution.
Maybe this is a NixPkgs vs NixOS thing. Also, using Nix mostly to supplement packages I hadn't already installed through my distro probably meant I hit more fringe areas. But I've even encountered cache misses and failed builds for some pretty big Python libraries on certain commits.
Debian-based out-of-the-box functionality for stuff is indeed also Not Great, IIRC— Stable, but yeah, sometimes maybe a bit "incomplete". Actually, Arch-based has worked well IME.
Yeah. I personally don't care about that stuff unless it directly impacts something I'm working on.
And that's why I say Nix is a great tool for package management, but not something I'd personally want to use as an OS base. When you're already elbow-deep in the plumbing anyway, Nix makes it way easier to swap components out. But when you just want to install and use an application, editing Nix configs feels like more work, and it's so much easier to just
pacman
/yum
/apt-get
install firefox
or whatever and get on with your day.Plus, some specific red flags surrounding stability and interoperability:
ALSA is apparently hardcoded to just straight-up not work with a Nix root. Not sure how NixOS handles it, but in my specific use case, I had to
symlinkJoin{paths=[alsa-lib alsa-plugins]}
so they could find each other. Pretty sure it took a lot ofstrace -f -e trace=file
andnix-locate
for me to figure this one out, just to get sound working.QtWebEngine
/Chromium has to be run through some kind ofsed -e "whatever.so"
to "Patch library paths in Chromium sources" in order to even run, because it's also hardcoded to just not work with a Nix root. IIRC, this one I figured out by just straight-upgrep
ping on the compiled binaries after seeing the errors instrace
or whereever. Seems a bit ridiculous, using a RegEx to patch a web browser when installing it so it can even run.Binaries aren't safe either, because they probably need
patchelf
to be able to run on Nix.Flakes are apparently hosted as user repositories on a Microsoft-owned website, and can just randomly disappear sometimes.
Qt
generally takes a ton of extra steps to be able to run on Nix. And have you actually ever opened the wrapper the Nix hooks generate to see what it's actually doing? For one of my applications just now, you get a43kb
Bash script with apparently 581 assignments to just a handful of QT and XDG-related environment variables.OpenGL doesn't look safe either. Nix handles the drivers its own way, so to get OpenGL for Nix packages to work on other systems, you have to jump through some hoops. I assume the same amount of work in the opposite direction would be needed to use EG proprietary or statically compiled graphics applications on NixOS too.
Running precompiled binaries on Nix looks… Involved, as well. Sure, there's tools to automate it. But that only hides the complexity, and adding an opaque dependency sorta defeats the entire purpose of configurability and composability IMO.
I'm sure most of these problems are "solved", in the sense that NixOS implements workarounds that are the default when you install the affected derivations, and there are wrappers written for most other cases. But all of that adds maintenance, fragility, and complexity. It remarkably works well enough for userspace, but stuff like this still feels a bit house-of-cards-y for the basic OS and desktop. It's not Nix's fault, but so much of the work that goes into Nix seems to be just to force software that was never designed for it to run on it. Ultimately, the Linux FHS has momentum and adoption. Nix's technical design might be compelling, but so are interoperability, stability, and simplicity.
The NixOS enthusiasts are doing a lot of technically interesting work, but I personally find the results of that work most useful outside the NixOS ecosystem. And I do think Nix as a package manager is really great. Ever since I've installed it, I've basically incorporated it as a major component or tool in every sizable software project I've since started. But I just personally wouldn't want to base an entire OS on it.
Haiku: from where I am, you're all Linux