1
0
Fork 0
forked from Skynet/wiki

assignment: saving current progress for this evening

This commit is contained in:
silver 2024-10-14 00:21:51 +01:00
parent e74e31752a
commit d98c090fb7
Signed by untrusted user: silver
GPG key ID: 36F93D61BAD3FD7D
3 changed files with 32 additions and 2 deletions

BIN
_git.tar.gz (Stored with Git LFS)

Binary file not shown.

View file

@ -1,7 +1,30 @@
# Nix/NixOS # 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 ## What it is
### Nix ### 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 ### Flakes
@ -28,3 +51,7 @@
#### Deployment #### Deployment
[nixos_skynet]: https://forgejo.skynet.ie/Skynet/nixos
[nix_paper]: https://edolstra.github.io/pubs/nspfssd-lisa2004-final.pdf

BIN
src/skynet/nix/firefox_co-existing.png (Stored with Git LFS) Normal file

Binary file not shown.