mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-06-21 20:41:25 +02:00
feat: intro to home-manager
This commit is contained in:
parent
871e68f9c8
commit
1480750bd3
@ -6,9 +6,11 @@ Nix is a declarative package manager that enables users to specify the desired s
|
||||
|
||||
NixOS, a Linux distribution built on top of the Nix package manager, can be described as "OS as Code." It employs declarative Nix configuration files to describe the entire state of the operating system.
|
||||
|
||||
An operating system consists of various software packages, configuration files, and text/binary data, all of which represent the current state of the system. Declarative configuration can manage only the static portion of this state. Dynamic data, such as PostgreSQL, MySQL, or MongoDB data, cannot be effectively managed through declarative configuration. It is not feasible to delete all new PostgreSQL data that is not declared in the configuration during each deployment. Therefore, **NixOS primarily focuses on managing a portion of the system state in a declarative manner**. Dynamic data mentioned above, along with the contents in the user's home directory, remain unaffected by NixOS when rolling back to a previous generation.
|
||||
An operating system consists of various software packages, configuration files, and text/binary data, all of which represent the current state of the system. Declarative configuration can manage only the static portion of this state. Dynamic data, such as PostgreSQL, MySQL, or MongoDB data, cannot be effectively managed through declarative configuration(It is not feasible to delete all new PostgreSQL data that is not declared in the configuration during each deployment).
|
||||
Therefore, **NixOS primarily focuses on managing a portion of the system state in a declarative manner**.
|
||||
Dynamic data mentioned above, along with the contents in the user's home directory, remain unaffected by NixOS when rolling back to a previous generation.
|
||||
|
||||
Although we cannot achieve complete system reproducibility, the `/home` directory, being an important user directory, contains many necessary configuration files. To bridge this gap, a significant community project called [home-manager](https://github.com/nix-community/home-manager) was initiated. home-manager is designed to manage user-level packages and configuration files within the user's home directory.
|
||||
Although we cannot achieve complete system reproducibility, the `/home` directory, being an important user directory, contains many necessary configuration files. A significant community project called [home-manager](https://github.com/nix-community/home-manager) is designed to manage user-level packages and configuration files within the user's home directory.
|
||||
|
||||
Due to Nix's features, such as being declarative and reproducible, Nix is not limited to managing desktop environments but is also extensively used for managing development environments, compilation environments, cloud virtual machines, and container image construction. [NixOps](https://github.com/NixOS/nixops) from the official Nix project and [deploy-rs](https://github.com/serokell/deploy-rs) from the community are both operational tools based on Nix.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user