mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-08-19 08:51:33 +02:00
fix: typos, broken links, and other updates
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
## Advantages & Disadvantages of NixOS
|
||||
|
||||
## Advantages of Nix
|
||||
|
||||
## Advantages
|
||||
|
||||
- **Declarative configuration, Environment as Code, can be managed with Git**
|
||||
- Nix Flakes lock dependences's version through a lock file named `flake.lock`, to ensure that the system is reproducible. This idea actually borrows from some package managers such as npm, cargo, etc.
|
||||
@@ -12,7 +14,7 @@
|
||||
- **The community is very active, and there are quite a few third-party projects**. The official package repository, nixpkgs, has many contributors, and many people share their Nix configuration on Github/Gitlab. After browsing through it, the entire ecosystem gives me a sense of excitement in discovering a new continent.
|
||||
|
||||
|
||||
## Disadvantages of Nix
|
||||
## Disadvantages
|
||||
|
||||
- **High learning curve:**: If you want the system to be completely reproducible and avoid pitfalls caused by improper use, you need to learn about the entire design of Nix and manage the system in a declarative manner. You cannot blindly use `nix-env -i` (which is similar to `apt-get install`).
|
||||
- **Chaotic documentation**: Flakes is still an experimental feature, and there are currently few documents introducing it, Most of the Nix community's documentation only introduces the old cli such as `nix-env`/`nix-channel`. If you want to start learning Nix directly from Flakes, you need to refer to a large number of old documents and extract what you need from them. In addition, some of Nix's current core functions are not well-documented (such as `imports` and Nix Module System), to figure out what it does, it is best to look at the source code...
|
||||
|
@@ -1,6 +1,3 @@
|
||||
---
|
||||
footer: false
|
||||
---
|
||||
|
||||
## Introduction to Nix & NixOS
|
||||
|
||||
|
@@ -1,16 +1,13 @@
|
||||
## Installation
|
||||
|
||||
|
||||
Nix can be installed in multiple ways:
|
||||
|
||||
1. Install on macOS/Linux/WSL as a package manager.
|
||||
2. Install NixOS, it's a Linux distribution that uses Nix to manage the entire system environment.
|
||||
|
||||
I chose to directly install NixOS using its official ISO image, to manage the entire system through Nix as much as possible.
|
||||
This book aims to introduce the usage of NixOS & Flakes, so we just skip the content related only to Nix here.
|
||||
|
||||
The installation process is simple, and I won't go into details here.
|
||||
The installation process of NixOS is simple, and I won't go into details here.
|
||||
|
||||
Some materials that may be useful:
|
||||
|
||||
1. [Official installation method of Nix](https://nixos.org/download.html): written in bash script, `nix-command` & `flakes` are still experimental features as of 2023-04-23, and need to be manually enabled.
|
||||
1. You need to refer to the instructions in [Enable flakes - NixOS Wiki](https://nixos.wiki/wiki/Flakes) to enable `nix-command` & `flakes`.
|
||||
2. The official installer does not provide any uninstallation method. To uninstall Nix on Linux/macOS, you need to manually delete all related files, users, and groups.
|
||||
2. [The Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer): a third-party installer written in Rust, which enables `nix-command` & `flakes` by default and provides an uninstallation command.
|
||||
Please just go to the official download site to see more details: <https://nixos.org/download.html>
|
||||
|
Reference in New Issue
Block a user