chore: add note

This commit is contained in:
Ryan Yin 2024-12-10 21:26:24 +08:00
parent b08eb78db9
commit 6ea7ef8215
2 changed files with 7 additions and 0 deletions

View File

@ -104,6 +104,10 @@ Now, when you execute `sudo nixos-rebuild switch` to apply the configuration, th
should not change at all because we have simply switched to using Nix Flakes, and the
configuration content remains consistent with before.
> If your system's hostname is not `my-nixos`, you need to modify the name of
> `nixosConfigurations` in `flake.nix`, or use `--flake /etc/nixos#my-nixos` to specify
> the configuration name.
After the switch, we can manage the system through the Flakes feature.
Currently, our flake includes these files:

View File

@ -92,6 +92,9 @@ cat flake.nix
现在执行 `sudo nixos-rebuild switch` 应用配置,系统应该没有任何变化,因为我们仅仅是切换到
了 Nix Flakes配置内容与之前还是一致的。
> 如果你的系统 Hostname 不是 `my-nixos`,你需要在 `flake.nix` 中修改 `nixosConfigurations`
> 的名称,或者使用 `--flake /etc/nixos#my-nixos` 来指定配置名称。
切换完毕后,我们就可以通过 Flakes 特性来管理系统了。
目前我们的 flake 包含这几个文件: