- cross-posted to:
- unixporn@lemmy.ml
- cross-posted to:
- unixporn@lemmy.ml
OC by @DieserTypMatthias@lemmy.ml
Configuration
- Terminal: Alacritty
- Music player: >Lollypop
- Bar: Polybar
- Discord client: Vesktop
- Visualizer: Cava
OC by @DieserTypMatthias@lemmy.ml
Configuration
- Terminal: Alacritty
- Music player: >Lollypop
- Bar: Polybar
- Discord client: Vesktop
- Visualizer: Cava
Could someone please explain NixOS to me in simple terms? Whatever I’ve understood thus far is that NixOS is not actually an operating system/distribution. But is it? Have I misunderstood?
Is it merely a package manager? How does the system work, from declarative config to installed packages?
And like, do you have to run nix-shell for every dang command you’d like to run??
Theres three things at play here: nix, nixpkgs, and NixOS.
Nix is a programming language. Its designed as its primary purpose to configure, build, and install software.
Nixpkgs is a collections of mamy bundles of premade nix code called derivations. These derivations include the build instructions for applications and the configuration options for those applications. This part is most equivalent to a package repository, but it does not contain prebuilt packages. It only contains the instructions for building it.
Nix has a wide variety of tools for managing these derivations. This includes downloading derivations from nixpkgs and building them locally on your machine (or finding prebuilt packages from a cache). Nix shell is one of those tools that downloads a package temporarily, and makes it available in your shell. You wouldnt use nix shell for installing things permanently.
The OS built with nix as the primary package manager is NixOS. It allows you to define your entire system state as a derivation: your systemd units, installed packages, user configuration, graphical environment, etc.
The best part of NixOS is that it takes the OS and represents the state of the computer as a single repository of code. If you look up someones nixos configuration on GitHub, you’ll see a single collection of files (filled with derivations!) that completely and totally define the state of the system.