My First Impressions of Nix

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • nixpkgs

    Nix Packages collection & NixOS

  • Your mind must be pure to understand Nix. Work on your purity. Just kidding. You might explain why you want to try nix? That would help customize an explanation for you, because there are levels. Umm... here is my attempt. Sorry.

    Nix is a programming language plus utilities that are useful to define and work with software packages in a reproducible way (https://github.com/nixos/nix/).

    Each package is called a "derivation", which is a function that takes inputs and makes output. The inputs are everything that is needed to make the output. It is "pure functional" package management - for the same input arguments, the same output will be produced. Nix is really fast because each derivation is hashed and cached and the language is lazy-evaluated.

    Builds are "hermetic", meaning only the inputs specified in the derivation are available at build time. Contrast this to some packaging systems, where the build is done against some staging area where packages get installed as they are built and the output can depend on the non-deterministic order that packages are built.

    Nixpkgs (https://github.com/nixos/nixpkgs/) is a large collection of recipes for existing software. It contains both rules to build software as well as "modules" to configure it or extend it. NixOS the linux distribution is also part of nixpkgs. There are lots of design patterns here and it can go pretty deep. There are also tons of hacks and patches and workarounds to make software conform to the way nix works. Nixpkgs also has a lot of useful library modules built in.

    Nix is the latin word for snow. Nix "flakes" are a way to combine multiple inputs as well as pin the version of inputs. Kind of like pipenv/requirements.txt or "cargo lock" or "yarn lock" but for anything.

    The output of derivations go in the "nix store" which is a path like /nix/store//, so all sorts of software can co-exist (think multiple incompatible versions of the same library) and can be referenced in a fixed way. Usually you will end up with an output that is mostly symlinks to other /nix/store/ paths.

    Nix can make practically any combination of software you can cobble together trivially rebuildable/reproducible. You can write some nix code that will produce a a VM image with test scripts as well as a script to launch the VM with a patched version of qemu and run those tests. You can have all your dotfiles/configuration in code with nix installed just for your user on top of Ubuntu. You can generate a raspberry pi sd card image from a short nix source file and a single command, and then 6 months later change a single line and regenerate it without worrying it might be broken.

    You can achieve a lot of that stuff with Yocto or Ansible or a Dockerfile and scripts, but it would be slower than nix and more fragile.

    If you want to install a package, search for it at https://search.nixos.org

    The gnome system monitor is gnome.gnome-system-monitor for example https://search.nixos.org/packages?channel=23.05&show=gnome.g...

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • nix-config

    Personal nixos and home-manager configurations. (by Misterio77)

  • Yes. E.g. some guy's config with 6 different machines[1]: multiple desktops, laptops, servers, a Raspberry Pi, and a VPS. That's a rather advanced use of Nix for configuration, but definitely shows what it's capable of.

    [1] https://github.com/Misterio77/nix-config

  • fleek

    Discontinued [deprecated] Own your $HOME

  • Coincidentally I came across Fleek this morning, which appears to be a simplified Nix abstraction?

    https://getfleek.dev/

  • aws-cli

    Universal Command Line Interface for Amazon Web Services

  • Just for your consideration, the network effect is very real with package managers, too:

    https://search.nixos.org/packages?channel=23.05&show=awscli2 is 2.11.27 (even on the "unstable" channel), versus https://formulae.brew.sh/formula/awscli#default that is 2.12.1, which correctly is the most current (https://github.com/aws/aws-cli/tags)

  • homebrew-core

    🍻 Default formulae for the missing package manager for macOS (or Linux)

  • This is incorrect. Nixpkgs updated to 2.12 faster than Homebrew.

    - Nixpkgs (4 days ago): https://nixpk.gs/pr-tracker.html?pr=238031

    - Homebrew (3 days ago): https://github.com/Homebrew/homebrew-core/pull/133968

    Your link refers to the 23.05 stable release channel, so it'd likely stay at 2.11. Package updates don't get backported to stable channels except for fixes. Additionally, the package search page probably isn't updated in real time so the version might be slightly out of sync.

    Nixpkgs is generally quick to update packages because Nix encourages automation.

  • termina

    wandering aimlessly throughout a vast wilderness of calamitous intent

  • not sure how approachable it might be, but i like to think the documentation isn't too bad for my personal stuff.

    definitely nothing so well thought out as a tutorial, but i try to describe the structure & implementation of my approach + cross-link to relevant tools that i incorporate.

    lmk if you find it useful at all: https://github.com/jkachmar/termina

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • devenv

    Fast, Declarative, Reproducible, and Composable Developer Environments

  • nix

    Nix, the purely functional package manager

  • Your mind must be pure to understand Nix. Work on your purity. Just kidding. You might explain why you want to try nix? That would help customize an explanation for you, because there are levels. Umm... here is my attempt. Sorry.

    Nix is a programming language plus utilities that are useful to define and work with software packages in a reproducible way (https://github.com/nixos/nix/).

    Each package is called a "derivation", which is a function that takes inputs and makes output. The inputs are everything that is needed to make the output. It is "pure functional" package management - for the same input arguments, the same output will be produced. Nix is really fast because each derivation is hashed and cached and the language is lazy-evaluated.

    Builds are "hermetic", meaning only the inputs specified in the derivation are available at build time. Contrast this to some packaging systems, where the build is done against some staging area where packages get installed as they are built and the output can depend on the non-deterministic order that packages are built.

    Nixpkgs (https://github.com/nixos/nixpkgs/) is a large collection of recipes for existing software. It contains both rules to build software as well as "modules" to configure it or extend it. NixOS the linux distribution is also part of nixpkgs. There are lots of design patterns here and it can go pretty deep. There are also tons of hacks and patches and workarounds to make software conform to the way nix works. Nixpkgs also has a lot of useful library modules built in.

    Nix is the latin word for snow. Nix "flakes" are a way to combine multiple inputs as well as pin the version of inputs. Kind of like pipenv/requirements.txt or "cargo lock" or "yarn lock" but for anything.

    The output of derivations go in the "nix store" which is a path like /nix/store//, so all sorts of software can co-exist (think multiple incompatible versions of the same library) and can be referenced in a fixed way. Usually you will end up with an output that is mostly symlinks to other /nix/store/ paths.

    Nix can make practically any combination of software you can cobble together trivially rebuildable/reproducible. You can write some nix code that will produce a a VM image with test scripts as well as a script to launch the VM with a patched version of qemu and run those tests. You can have all your dotfiles/configuration in code with nix installed just for your user on top of Ubuntu. You can generate a raspberry pi sd card image from a short nix source file and a single command, and then 6 months later change a single line and regenerate it without worrying it might be broken.

    You can achieve a lot of that stuff with Yocto or Ansible or a Dockerfile and scripts, but it would be slower than nix and more fragile.

  • dotfiles

    Miscellaneous config files (legacy) (by 9ary)

  • nixos-config

    My Personal Nix/NixOS Configuration. (by Baitinq)

  • nixfiles

    My NixOS configuration and assorted other crap.

  • dotfiles

    My dotfiles (by catern)

  • infra

  • network

    Home Network (by disassembler)

  • rasp-nix

    My Raspberry Pi(4) NixOS Configuration

  • NixOS-config

  • nixos-config

    Configuration for my NixOS machines (by lopsided98)

  • dotfiles

    My NixOS dotfiles (by Mic92)

  • nixpkgs

    🧔 personal nix config #nixos (by moul)

  • musnix

    Real-time audio in NixOS

  • dotfiles

    My collection of dotfiles (by myme)

  • emacs-overlay

    Bleeding edge emacs overlay [maintainer=@adisbladis]

  • Home Manager using Nix

    Manage a user environment using Nix [maintainer=@rycee]

  • infra

    NixOS configurations for nixos.org and its servers (by NixOS)

  • nixos-configs

    My NixOS and nix-darwin configs (by reckenrode)

  • os

    My OS & dotfiles configuration for Linux and MacOS devices (Nix) (by skogsbrus)

  • nixos-configs

    My NixOS configs

  • site

    The new frontend/backend code for https://xeiaso.net

  • dotfiles

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts