this post was submitted on 16 Oct 2023
208 points (97.3% liked)
Linux
47952 readers
1258 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It all began with Nix software build system and package manager; they needee a way to build, compile software in a reproducible way. That is, if it builds on my machine, it should build on yours too given some constraints. Then they build a whole package repository for such sofware or package definitions, Nixpkgs, that can be build or retrieved using Nix package manager. Nixpkgs grew to be a repository for enabling runnig an GNU Linux OS on it: NixOS. It is declarative in the sense you write what it should contain like packages and behaves like system services. For example, see https://git.sr.ht/~misterio/nix-config.
Atomic in the sense that when you want to change system's configuration or state, everything should suceed in that update, otherwise fails; it is everything or nothing. This enables storing previous and current system revisions, so can rollback to previous state.
Nix plus things like flakes, nix shell, enables a build inviroment akin to containers, but much better, correct, and flexible.
Haskell is just an ecossytem Nixpkgs support.
May I ask what does .nix files do? I have joined unixporn community,and when I look into the dotfiles of some nix os user,their config are all written in nix rather than .conf or some other prevalent files. Should I learn nix if I want to use nix os? Or can I config my apps such as waybar in a way just like other systems (such as arch)?
Nix files are Nix [function] expressions to declare and set your system; there are many options you can set for example. You just need to learn a few chapters of https://nixcloud.io/tour/ and https://nixos.org/manual/nix/stable/language/, also modularization using imports.
For user/de configuration, you can either do the usual way or use home-manager.