User Controls

NixOS

  1. #1
    Lanny Bird of Courage
    I realize most you degenerates can't into loonix, BUT for the intrepid soul willing to brave the infinite cascade of config files and arcane incantation in search of that sweet sweet rice, nixos is pretty dank.

    The sorta headline feature is environment and build isolation and declarative dependency management. You can think of it like virtual envs/npm/cargo/whatever modern language-specific package manager but expanded to encompass all the software on a system. For me the paradigm case is using something like lxml or pillow where you need to either have some binaries sitting on your system in just the right place, or have the stars align to have the right gcc version and whatever the hell else to be able to build from source. Language-specific package managers just kinda shrug, the standard practice is to prominently put a note in your README with a laundry list of what needs to be installed, and maybe apt/pacman/snap/rpm snippets if you're really nice, which just sucks. Nix provides a way to declare a deps on system level packages, and transitively a way to build those packages, so no more praying someone reads your install instructions and having to update that regularly.

    Some cool knockon effects from that are that complex applications can be distributed in a better manner than a lengthy runbook on a website somewhere. Great example of this was plex where you can have a fully functional server by slapping `services.plex.enable = true;` into a config file and it's done, you'll have a DB, systemd services, language runtimes, and firewall config all set up. Mind you that's kind of the ideal case, if you ever need to actually author a package the learning curve is kinda steep, not aided by the haskell flavored config language. Once you get used to it, it makes a lot of sense, but the docs are perpetually incomplete and there's a lot of idiom to wrap your head around. On the up side, if it works for you it works for everyone, and despite nixpkgs being a sprawling mess the broken package phenomenon is actually quite rare as a result of the build isolation.

    I've been using it as my daily driver for a couple months, and switched off of Debian for it for NIS recently, and I don't think I'll be going back.
    The following users say it would be alright if the author of this post didn't die in a fire!
  2. #2
    aldra JIDF Controlled Opposition
    doesn't that mean you have a different set of dependent packages for every application though? sounds like a different kind of nightmare, kind of what slack did
  3. #3
    totse2118 Space Nigga [my ci light-haired pongee]
    I'm going to develop my own privacy based fork caled NigsOS
  4. #4
    Lanny Bird of Courage
    Originally posted by aldra doesn't that mean you have a different set of dependent packages for every application though? sounds like a different kind of nightmare, kind of what slack did

    That's a possibility, e.g. if one application needs glib version X and another needs glib version Y then they can be built like that. In practice there's a content addressed cache that's shared and most packages declare deps in the form of "give me the system default", so most things work through dynamic linking and end up the same versions so you don't have 80 copies of whatever, openssl or something, in memory at once. But you have the option of pinning something specific for special snowflake packages without fucking with everything else in the system. It works smoothly because everything up to the kernel works like this, so if some really picky package needs its very specific set of dependencies it can do so without anything else ending up linking against those due to the build isolation.

    Which is also nice for "oh fuck" situations in deployment where you can hang on to your old build and all its deps on the FS, so if the new build doesn't work you still have working binaries for the old one. The bootloader also has a nice rollback function for "I fucked up my display drivers and I'm booting to a black screen" type situations.
Jump to Top