# Nix/NixOS The [Skynet Cluster][nixos_skynet] is (for the most part) running on a Linux variant called NixOS. This article aims to introduce you to Nix and Nixos in order to get you up to speed to administer the cluster. ## What it is ### Nix #### Package Manager The word Nix refers to two things: a language and a package manager. These are deeply interlinked together with the language being how the package manager is able to do its job. Nix grew out of a [PhD by Eelco Dolstra][nix_paper] wherein he proposes a slightly different way to manage dependencies on a system. For most Linux systems programs make use of other software installed on the computer, for the most part this works fine. Where issue may arise is if one program needs to update one of these dependencies, specially a minor or major patch where backwards compatibility is not guaranteed. If another program is using this (system wide) dependency then it may run into interface issues when using it. In a sense updating one program can break another on the system. The route the Nix package manager takes is it treats each program as a function. Using teh Nix language a function for that package is created which states what inputs are required, what is needed to turn those inputs into teh program as well as the name for the output. The output is then saved in a read only location in the format of ``/nix/store/$hash-program-name-version``. This output can eitehr be used as the input of another program or be used as is by the system/user. Using this format means that any change in the inputs or the program itself will result in a different output. This means that multiple versions of the program (some even the same version but different commit) can co-exist on the one system. An example using different versions of Firefox: ![img.png](nix/firefox_co-existing.png) #### Language ### Flakes ### Nixos ### Lix ## Why we use it {Details of how the config was ascattered and hard to find} {Also embracing devops and reduced manpower} ## How we use it ### Requirements {add warnign that git and git-lfs should also need to be in teh path} ### Download ### Colmena #### Local ##### Building ##### Repl #### Deployment [nixos_skynet]: https://forgejo.skynet.ie/Skynet/nixos [nix_paper]: https://edolstra.github.io/pubs/nspfssd-lisa2004-final.pdf