From bf588787c0e43ec85ae66ae5121e2ceb2845b516 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Mon, 9 Feb 2026 13:52:27 -0500 Subject: [PATCH] modernize instructions --- MIGRATION-GUIDE.md | 3 ++- README.md | 23 ++++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/MIGRATION-GUIDE.md b/MIGRATION-GUIDE.md index 7d6f69f..b210de1 100644 --- a/MIGRATION-GUIDE.md +++ b/MIGRATION-GUIDE.md @@ -243,7 +243,8 @@ Delete the downloaded key files from `~/Downloads/`. After all manual steps are done: ```sh -sudo nixos-rebuild switch --flake ~/nix-config#xps15 +cd ~/nix-config +sudo nixos-rebuild switch --flake .#xps15 ``` ### 12. Verify diff --git a/README.md b/README.md index 5df14b4..36d371f 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,28 @@ recovery, and key restore instructions. ## Day-to-day +All commands assume you're in `~/nix-config`. + ```sh -sudo nixos-rebuild switch --flake ~/nix-config#xps15 +# rebuild after editing config +sudo nixos-rebuild switch --flake .#xps15 -nix flake update --flake ~/nix-config -sudo nixos-rebuild switch --flake ~/nix-config#xps15 +# update all flake inputs, then rebuild +nix flake update +sudo nixos-rebuild switch --flake .#xps15 -sudo nixos-rebuild switch --flake ~/nix-config#xps15 --rollback +# rollback to previous generation +sudo nixos-rebuild switch --flake .#xps15 --rollback -sudo nix-collect-garbage -d +# format all nix files +nix fmt + +# garbage collect old generations + store +sudo nix profile wipe-history --profile /nix/var/nix/profiles/system +nix store gc + +# check flake for errors without building +nix flake check ``` ## Architecture