mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-11-26 18:13:14 +01:00
13 lines
379 B
Markdown
13 lines
379 B
Markdown
## Updating the System
|
|
|
|
With Flakes, updating the system is simple. Just run the following commands in `/etc/nixos`:
|
|
|
|
```shell
|
|
# Update flake.lock
|
|
nix flake update
|
|
# Apply the updates
|
|
sudo nixos-rebuild switch
|
|
```
|
|
|
|
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`.
|