From 4ac7557b4fbf58178c6d216d766805b50c329abe Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Wed, 21 Feb 2024 22:16:43 +0100 Subject: [PATCH] Rewrite updating section --- guides/installation.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/guides/installation.md b/guides/installation.md index 299a8f7..4efc59c 100644 --- a/guides/installation.md +++ b/guides/installation.md @@ -153,9 +153,20 @@ git commit -m "Initial commit" ## Updating -Over time, to update the software that's installed on your machine, you can use -`nix flake update`, to update your `flake.lock` file, and then `nixos-rebuild -switch`, to get switch your system to the new dependencies. +Over time, you'll want to update the software that's installed on your machine, +to do that, we'll first want to update the `flake.lock` file, which contains +the commit sha of the nixpkgs repo that's being used. To do so, you can use +this command (while in `~/dots` directory): + +```sh +nix flake update +``` + +After which, you'll probably also want to rebuild your system and switch: + +```sh +nixos-rebuild switch --flake . +``` > [!TIP] > This replaces the legacy (non-flake) regime's command: `nixos-rebuild switch --upgrade`