diff --git a/docs/nixos-with-flakes/update-the-system.md b/docs/nixos-with-flakes/update-the-system.md index 3d14296..271cfc3 100644 --- a/docs/nixos-with-flakes/update-the-system.md +++ b/docs/nixos-with-flakes/update-the-system.md @@ -7,7 +7,7 @@ or any other place where you keep the configuration.): # Update flake.lock nix flake update # Apply the updates -sudo nixos-rebuild switch +sudo nixos-rebuild switch --flake . ``` Sometimes, you may encounter a sha256 mismatch error when running `nixos-rebuild switch`. This can be resolved by updating `flake.lock` through `nix flake update`. diff --git a/docs/zh/nixos-with-flakes/update-the-system.md b/docs/zh/nixos-with-flakes/update-the-system.md index 2f2befc..2f17186 100644 --- a/docs/zh/nixos-with-flakes/update-the-system.md +++ b/docs/zh/nixos-with-flakes/update-the-system.md @@ -6,7 +6,7 @@ # 更新 flake.lock nix flake update # 部署系统 -sudo nixos-rebuild switch +sudo nixos-rebuild switch --flake . ``` 另外有时候安装新的包,跑 `sudo nixos-rebuild switch` 时可能会遇到 sha256 不匹配的报错,也可以尝试通过 `nix flake update` 更新 flake.lock 来解决(原理暂时不太清楚)。