That Computer Scientist - Nix is the New Arch!

3 years ago by uthredii to c/linux

load all comments
apt_install_coffee 84 points 3 years ago

NixOS needs what is IMO the killer feature of Arch: the wiki.

Comprehensive documentation on not only the OS but the additional packages that we use is what drew me to Arch, and the thing that makes me swear in frustration whenever I have to use Ubuntu/Debian.

NixOS is an excellent OS that has the promise of being every bit as hackable as Arch, but far more stable. Problem is, configuration is very different and needs extensive documentation to reduce that friction point.

path: 0 521825, hotness: undefined, score: 84, children: 31
eleanor 19 points 3 years ago

The Arch wiki is pretty distro-agnostic (barring package names and pacman specific stuff). I've been distro-hopping for past decade and I've always used it as a reference for setting things up.

path: 0 521825 528398, hotness: undefined, score: 19, children: 3
apt_install_coffee 9 points 3 years ago

It's distro-agnostic because Arch does very little to modify packages when they're put in the repos, which means they'll line up with the packages own man page & readme. The issue comes when opinionated distros modify things like command syntax, etc file locations and default behaviour.

If NixOS is similarly unopinionated, it'd only really have to document its own system layer, but my point is that Arch being guaranteed to reflect a well documented system is what drew me to it.

path: 0 521825 528398 536334, hotness: undefined, score: 9, children: 2
Atemu 12 points 3 years ago

NixOS needs what is IMO the killer feature of Arch: the wiki.

NixOS has a killer feature which obviates a wiki for most such purposes: NixOS options. They document themselves!

You don't need to look up a wiki on how to install and enable i.e. paperless and all the other services it depends on, you simply set services.paperless.enable and NixOS configures everything for you internally.

The option tells you roughly what it does internally and the other options provide pointers for things you might want to tweak about it. The services.paperless.extraConfig option for example tells you how to configure it (pointing to upstream documentation in this case) and even gives an example on what you might want to do.

Another example is how to install Steam. In Arch, the wiki must tell you all the manual steps required to enable multilib, install the steam package, install 32bit dependencies, yada yada.

In NixOS, you simply set programs.steam.enable = true;. Off to your games.
You wanna customise the Steam package to add additional flags, pass env vars or add additional packages your weird Linux-native indie game needs? programs.steam.package tells you how to do that right in the place where you do it.
While you're looking for steam, you might also come across hardware.steam-hardware.enable which you need to set in order to make your Valve Index and Steam Controller work properly.
You wanna start Steam in a gamescope session right from the display-manager? programs.steam.gamescopeSession does it for you. No need to copy paste some snippet that you'll instantly forget about and maybe breaks in a few months. programs.steam.gamescopeSession is maintained upstream by NixOS, so if it breaks, someone will go and fix that and nobody needs to adjust any of their copy-pasta because they'll just update as they always do and it just starts working again.

None of this is perfect yet and the quality of documentation of NixOS options really varies but I think you get the idea here. I already rarely look at the NixOS wiki to configure my system because the system configuration tells me what I need to do already and this will only get better as options get refined.

the promise of being every bit as hackable as Arch

I don't think it makes that promise and I don't think it's true.

NixOS is about doing things "properly"; applying software engineering to software environment management.

Whipping up a quick hack is much more complicated and time intensive on NixOS than doing so on Arch because it's way more abstract. You can't just quickly replace some binary with your own compiled one, you need to use NixOS' systems to wire in the binary and build it with Nix to begin with.

Maintaining a system (even one with terrible hacks) is much simpler in NixOS however.

path: 0 521825 523148, hotness: undefined, score: 12, children: 10
Flicsmo 13 points 3 years ago

You're underrepresenting the complications of NixOS and overrepresenting the complications of Arch. For example, to install Steam I would run sudo pacman -Syu steam. On a typical Arch setup that's all that's needed.

Another example is how to install Steam. In Arch, the wiki must tell you all the manual steps required to enable multilib, install the steam package, install 32bit dependencies, yada yada.

And that's why the Arch wiki is so great - it has details and links about everything that goes into making something work. If you want to learn more or if something goes wrong it's all right there.

But yes, I think you hit the nail on the head at the end there - hackability is Arch's strength, everything is exposed and flexible to tinkering. It's easy to make almost anything work, and easy to learn how it works. That's very different from NixOS's core philosophy of stability and reproducibility.

There are inherent pros and cons to both approaches - it really comes down to a mix of personal preference and using the right tool for the right job. They're apples and oranges, and the article framing NixOS as a superior successor to Arch is as silly as the reverse would be.

path: 0 521825 523148 526131, hotness: undefined, score: 13, children: 0
Helix 10 points 3 years ago

NixOS options. They document themselves!

Didn't read past that as you clearly don't understand what the differences between documentation, a tutorial and code comments are.

path: 0 521825 523148 527923, hotness: undefined, score: 10, children: 2
hschen 5 points 3 years ago

I installed NixOS on a laptop and tried to run a steam game and it just straight up didn't launch anything, went to the wiki to figure out the amd drivers, opengl whatever put like 10 new lines in my nix config rebuilt restarted still nothing works, after about 2 hours i just swapped back to arch and the games launched straight away, so for me it wasnt as easy as you may claim it to be. I also tried it on my desktop before and it was a better experience, but still not great. The nix config file is a bit of a mess of options that you have to dig into wiki pages and searching stuff to figure out how to get some stuff to work

path: 0 521825 523148 526121, hotness: undefined, score: 5, children: 3
apt_install_coffee 1 point 3 years ago

Having options is not the same thing as documenting those options; well outlined documentation doesn't just dictate how to do something but also points out what you may want to do i.e. filling out unknown-unknowns.

Just because NixOS makes for an excellent DevOps template doesn't mean it can't also be an excellent platform for hacking together random crap. I understand that NixOS advertises itself as the former, but when I say "promises to be" I don't mean "makes a promise to be", but "has promise for being".

Features like: a common configuration interface, safe rollback, atomic changes, nixos-hardware all are features that enable developers to safely hack together solutions, and then have an excellent log detailing what they just did.

path: 0 521825 523148 544739, hotness: undefined, score: 1, children: 1
lengsel 10 points 3 years ago

The Nix package manager got ported to OpenBSD, so that part of NixOS must be excellent.

path: 0 521825 521858, hotness: undefined, score: 10, children: 9
apt_install_coffee 9 points 3 years ago

I'm surprised, and really pleased; I was under the impression that Nix required Systemd, and was thus a Linux exclusive. Good to see

path: 0 521825 521858 521973, hotness: undefined, score: 9, children: 2
Atemu 6 points 3 years ago

Note that, while the Nix package manager can technically run on OpenBSD to some capacity, that doesn't mean packages in Nixpkgs are compatible with OpenBSD.

I can't comment on the current situation from first-hand experience but I can say that there is no support guarantee as there is for Linux and macOS and that there is no binary cache either. You have to build everything yourself and I'm not even sure we can build even basic packages such as hello on BSDs yet.

path: 0 521825 521858 523200, hotness: undefined, score: 6, children: 5
ReakDuck 9 points 3 years ago

Yeah true, whenever I have problems with some packages like Wayland and its alternative Xorg tools or games, its Arch wiki that helps extremely to fix or understand the situation. Its like many experiences are combined and written in a simple language everyone can easily understand.

On Ubuntu for example, everything feels like its hardcoded, not the standard and its just not even documented. And the wiki has minimal info about the packages.

path: 0 521825 522039, hotness: undefined, score: 9, children: 0
jerb 8 points 3 years ago

Fully agreed- I experimented with it around November of last year and absolutely love the idea of it, but the documentation just isn't there. At the time I found nothing explaining flakes in a clear and concise manner so I had no idea how to use them or add them into my configs. People online kept saying to port the rest of my configuration to flakes but all of the examples online were complex and there was no simple example to build off of. I ended up settling for Universal Blue since it just uses OCI containers and I don't need a PhD to have a pseudo-declarative environment in it, but would love to revisit NixOS if the documentation ever gets better.

path: 0 521825 524912, hotness: undefined, score: 8, children: 0
dillydogg 6 points 3 years ago

I think NixOS needs an approachable installer or config builder

path: 0 521825 524185, hotness: undefined, score: 6, children: 1
saba 4 points 3 years ago

I'm new to NixOS, just installed it a few days ago, so I can't say much about it's pros and cons, but the installer was easy and I installed and booted into the new system very quickly. I think it might have been udpated in the past year, because I am watching a tutorial video from a year ago and he installs it via command line from the live iso.

edit: it also gave me a default configuration.nix which I've just been adding to (to get nginx with letsencrypt running, plus extra packages I wanted installed)

path: 0 521825 524185 527259, hotness: undefined, score: 4, children: 0
AI_toothbrush 4 points 3 years ago

Yeah if your knew to nix its even hard to figure out how to install a simple package.

path: 0 521825 523470, hotness: undefined, score: 4, children: 0
Makan 4 points 3 years ago

These are pretty good points.

path: 0 521825 522012, hotness: undefined, score: 4, children: 0
linux
linux

@lemmy.ml

login for more options
67083
9205
4151

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

go to feed...