diff --git a/README.md b/README.md index 85c27c3..af82c9e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ For each machine, there is a top-level directory, e.g. [yodaTab](yodaTab). * https://nixos.wiki/wiki/Nixos-rebuild -Directly change to new config, make it default: +Directly change to new config and make it default: ```shell sudo nixos-rebuild -I nixos-config=yodaTab/configuration.nix switch @@ -34,10 +34,18 @@ Then run `nixos-rebuild switch`, see above. ## Garbage Collection * https://nixos.org/manual/nix/stable/package-management/garbage-collection.html +* https://discourse.nixos.org/t/why-doesnt-nix-collect-garbage-remove-old-generations-from-efi-menu/17592/4 + +For all profiles: ```shell -nix-env --delete-generations 14d -nix-store --gc +sudo nix-collect-garbage --delete-older-than 14d +``` + +Remove old generations from EFI: + +```shell +sudo /run/current-system/bin/switch-to-configuration boot ``` ## Install Home Manager with niv