diff --git a/readme.md b/ReadMe.md similarity index 76% rename from readme.md rename to ReadMe.md index 9a82a80..b793d8d 100644 --- a/readme.md +++ b/ReadMe.md @@ -19,5 +19,8 @@ This whole folder is for the most part just a system to clean up importing - The [components](system_profiles/components) directory: - Should never import anything from this repository - It can import things from nixpkgs - - Should set only basic "system" settings + - Should set only basic "system" wide settings ("system" is not well defined) + NixOS has profiles this should be a similar concept to them + - [NixOS profiles](https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/profiles) + - [NixOS manual on profiles](https://nixos.org/manual/nixos/stable/#ch-profiles) diff --git a/docs/notes/ReadMe.md b/docs/notes/ReadMe.md new file mode 100644 index 0000000..688d22d --- /dev/null +++ b/docs/notes/ReadMe.md @@ -0,0 +1,4 @@ +# Not a source of checked sources +This folder is just notes in the process of learning nix stuff +It by no means was really checked for correctness +*You have been warned* diff --git a/docs/notes/my understanding of nix terms.md b/docs/notes/my understanding of nix terms.md new file mode 100644 index 0000000..610543a --- /dev/null +++ b/docs/notes/my understanding of nix terms.md @@ -0,0 +1,45 @@ +# My understanding of nix terms + +## The nix trinity + +### nix + +Is "just" a package manager + programming language attached to it. It is not necessarily connected to *nixpkgs* or *NixOS*. You could just create your own package repository and or distro. The package manager can also run standalone on basically any distro without needing something like NixOS. + +### nixpkgs + +A git repository with loads of recipes of packages and tools to build them more easily. + +- The `lib` that you "import" like this `{lib, ...}: {}` is coming from here. +- it also technically contains *NixOS* though it is mostly separate, there are some shared parts, but no dependencies as far as i know + +### NixOS + +A distro build upon nix and nixpkgs. It lives in the same repo as *nixpkgs* + +- Houses tools like `nixos-rebuild` +- And `switch-to-configuration` framework + +## Other big concepts + +### flakes + +The term is not just used for the new file layout, but also the *new cli* around it. *Flakes* try to go after more "purity". For example with flakes the `inputs` (read where to download sources) and replaces channels by it. + +- One of the Benefit is that you get a `flake.lock` file in which the sources are locked via various ways (git commit, hash, etc). + Beforehand channels where handled system wide and so developers had different versions again ... +- My suggestion use flakes and therefor avoid `fetch` commands and registry syntax with `` (a registry is basically just a naming system (dns) and i **think** `` would just point to your local channel and the end of the chain) + +### new cli + +As mentioned before with the flakes there also comes a new cli, mostly seperate tools new are part of nix + +| Old | New | +| -------------- | --------------- | +| nix-shell | nix shell | +| nix-store | nix store | +| ... | ... | + +- [nix manual on new cli](https://nix.dev/manual/nix/2.28/command-ref/new-cli/nix) +- [nix wiki on new cli](https://wiki.nixos.org/wiki/Nix_(command)) +