#+title: So, tell me about Nix - [[https://ghedam.at/15490/so-tell-me-about-nix][source]] - tags :: [[file:../20200629132801-nix.org][Nix]] [[file:../20200629132817-linux.org][Linux]] * Notes - Nix is: - A package manager - A programming language - An operating system (NixOS, a Linux distro) - Nix can be used like =brew= or =apt= #+begin_src bash :eval never # this will install curl nix-env -iA curl #+end_src - Nix's selling point is that it's capable of reproducible builds - One thing that's unique about Nix (the package manager) is that you can create ad-hoc development environments #+begin_src bash :eval never # this spawns a new shell with curl installed # once this shell is exited, it will no longer be available nix-shell -p curl #+end_src - =nix-shell= allows for the creation of isolated development environments - NixOS, unlike other Linux distros, allows a user to specify their configuration using the Nix package manager - For example, if I wanted to create a user whose default shell was =zsh=, I could do this via a configuration. The rest of my system's configuration would live here too - This also allows for rollbacks to any previous configuration - Nix, being a [[file:../20200604222704-functional_programming.org][functional programming]] language, basically describes system configuration like =state = nextState(currentState)= * Resources (from article) - [[https://github.com/rycee/home-manager][GitHub - rycee/home-manager: Manage a user environment using Nix]] - [[https://github.com/NixOS/nixops][GitHub - NixOS/nixops: NixOps is a tool for deploying to NixOS machines in a ...]] - [[https://github.com/LnL7/nix-darwin][GitHub - LnL7/nix-darwin: nix modules for darwin]] - [[https://nixcloud.io/tour/][A tour of Nix]] - [[https://ebzzry.io/en/nix/][A Gentle Introduction to the Nix Family]] - [[https://nixos.org/nixos/nix-pills/][NixOS - Nix Pills]]