this post was submitted on 05 Aug 2023
203 points (97.7% liked)

Linux

48040 readers
1182 users here now

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

Related Communities

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

founded 5 years ago
MODERATORS
 

I'm currently running Arch and it's great, but I'm noticing I'm not staying on the ball in regards to updates. I've been reading a bit about Nix and NixOS and thinking of trying it as my daily driver. I've got a Lenovo x1 xtreme laptop, I don't do much gaming (except OSRS), use firefox, jetbrains stuff, bitwarden, remmina, obsidian, and docker.

Is anyone running NixOS as their daily? How are you liking it and are there any pitfalls / stuff you wish you knew before?

you are viewing a single comment's thread
view the rest of the comments
[–] lloram239@feddit.de 39 points 1 year ago* (last edited 1 year ago)

First up, forget about install NixOS as a full distribution for the moment, instead just install the Nix packagemanager on your current system. That gives you like a quick&easy way to enjoy most of the benefits of NixOS without replacing what you already have up&running.

As for things to note:

  • nix-command and flakes are the new way of doing things, but still not enabled by default, this can make some old documentation a bit confusing, as this update completely changes the CLI interface, just enable them and ignore everything that keeps taking about the old `nix-env"

  • you'll be downloading a lot, NixOS has no binary compatibility for libraries, meaning, if a library changes, everything that depended on it changes as well, this can cause seemingly trivial updates to balloon into 30GB downloads

  • expect your installation to be bigger than usual, as upgrades will keep all the old software around, i.e. you can just boot into the previous version with a single click until you nix-collect-garbage -d all the old stuff, on systems with 32GB flash you have to be a bit careful to not run out of storage

  • no LTS releases, you'll have to update every six months

  • almost no compatibility to third party software by default, /bin/sh and /usr/bin/env are the only thing it has in common with the normal FHS file system layout that everybody else is using, so expect every install.sh to fail, there are of course ways around it (e.g. buildFHSEnv), but they require some extra effort

  • all system configuration happens in /etc/nixos/, the rest of /etc is just read-only symlinks

  • .nix configuration file syntax is a lazy evaluated functional language, that looks somewhat similar to JSON, it's quite a simple language, but not one that you can easily figure out just by looking at it (e.g. ":" defines a function, functions can only have one argument, everything else is done with currying), read the manual

  • https://search.nixos.org/options will be your best friend and nix repl followed by :l to tab-complete your way through the Nix structure

Overall I am very happy with NixOS. Switching to NixOS was the first time in a decade that Linux started to be fun again. It comes with an enormous package collection. Building your own packages is trivial. It is possible to upgrade, downgrade or just run multiple versions in parallel, so no forced-upgrades as on other distributions. Also the Nix package manager can work as first-class build system, meaning git repositories can be treated as full packages (assuming they contain a flake.nix), packages by the distribution no longer have to exist as this weird appendage that has to exist independently from Upstream.