home-manager README

The project's README from github.com/nix-community/home-manager. As one markdown file: README.md.

Home Manager using Nix

This project provides a basic system for managing a user environment using the Nix package manager together with the Nix libraries found in Nixpkgs. It allows declarative configuration of user specific (non-global) packages and dotfiles.

Usage

Before attempting to use Home Manager please read the warning below.

For a systematic overview of Home Manager and its available options, please see:

If you would like to contribute to Home Manager, then please have a look at "Contributing" in the manual.

Releases

Home Manager is developed against the nixpkgs-unstable branch, which often causes it to contain tweaks for changes/packages not yet released in stable NixOS. To avoid breaking users' configurations, Home Manager is released in branches corresponding to NixOS releases (e.g. release-26.05). These branches get fixes, but usually not new modules. If you need a module to be backported, then feel free to open an issue.

Words of warning

Unfortunately, it is quite possible to get difficult to understand errors when working with Home Manager. You should therefore be comfortable using the Nix language and the various tools in the Nix ecosystem.

If you are not very familiar with Nix but still want to use Home Manager then you are strongly encouraged to start with a small and very simple configuration and gradually make it more elaborate as you learn.

In some cases Home Manager cannot detect whether it will overwrite a previous manual configuration. For example, the Gnome Terminal module will write to your dconf store and cannot tell whether a configuration that is about to be overwritten was from a previous Home Manager generation or from manual configuration.

Home Manager targets nixpkgs-unstable and NixOS version 26.05 (the current stable version), it may or may not work on other Linux distributions and NixOS versions.

Now when your expectations have been built up and you are eager to try all this out you can go ahead and read the rest of this text.

Contact

You can chat with us on IRC in the channel #home-manager on OFTC. There is also a Matrix room, which is bridged to the IRC channel.

Installation

Home Manager can be used in three primary ways:

  1. Using the standalone home-manager tool. For platforms other than NixOS and Darwin, this is the only available choice. It is also recommended for people on NixOS or Darwin that want to manage their home directory independently of the system as a whole. See "Standalone installation" in the manual for instructions on how to perform this installation.

  2. As a module within a NixOS system configuration. This allows the user profiles to be built together with the system when running nixos-rebuild. See "NixOS module" in the manual for a description of this setup.

  3. As a module within a nix-darwin system configuration. This allows the user profiles to be built together with the system when running darwin-rebuild. See "nix-darwin module" in the manual for a description of this setup.

Home Manager provides both the channel-based setup and the flake-based one. See Nix Flakes for a description of the flake-based setup.

Translations

Home Manager has basic support for internationalization through gettext. The translations are hosted by Weblate. If you would like to contribute to the translation effort then start by going to the Home Manager Weblate project.

Translation status

License

This project is licensed under the terms of the MIT license.

home-manager (nix-community/home-manager)

Searching Database…

这是做什么的?Home Manager 用 Nix 包管理器来管理你的用户环境:你在配置文件里声明用户级别(非全局)的软件包和 dotfile,而不是手动安装和调整各种东西。
它是我直接运行的工具,还是嵌在 NixOS 里的配置?两者都是:它既提供独立的 home-manager 工具,也提供可以接入 NixOS 或 nix-darwin 系统配置的模块,这样你的用户配置就能和系统一起构建。
我该怎么安装配置它?按照手册选择适合你的模式:独立安装(在 NixOS 和 macOS 之外这是唯一选择)、用 nixos-rebuild 构建的 NixOS 模块,或者用 darwin-rebuild 构建的 nix-darwin 模块。基于 channel 和基于 flake 的配置方式都支持。
我是不是得先会 Nix 语言?实际上是的——README 要求你在使用 Home Manager 之前,先熟悉 Nix 语言以及 Nix 生态里的各种工具。
使用时可能出什么问题?报错信息可能很难看懂,而且 Home Manager 不一定能检测到它即将覆盖你手动配置过的设置——比如 Gnome Terminal 模块就会直接写入你的 dconf 存储。
必须用 NixOS 才能用它吗?不用。在 NixOS 和 macOS 之外,独立工具是唯一的选择;而且即使是 NixOS 或 macOS 用户,如果想让 home 目录独立于整个系统来管理,也推荐使用独立工具。
在 NixOS 之外能用吗,比如普通的 Debian 机器或 Mac 上?它面向 nixpkgs-unstable 和 NixOS 26.05,所以在其他 Linux 发行版上能不能用不好说。在 macOS 上它通过 nix-darwin 集成;其他环境则使用独立工具。
我还在学 Nix 的时候就能用吗?可以,但有个提醒:作者强烈建议先从一个很小、非常简单的配置开始,随着学习 Nix 的深入再逐步把它做得更复杂。
Home Manager 有其他语言的版本吗?它通过 gettext 提供基础的国际化支持,翻译托管在 Weblate 上,任何人都可以在上面贡献改进。
Size
508.6 MB
Stars
10.4K
Updated
CommitOct 15
Age
9y
Commits · 90 Days