From 89ba56f3e98ce1335624f6fde206f3d4bae170af Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Sun, 8 Sep 2024 11:36:54 +0100 Subject: [PATCH] Add documentation about grub and cleanup --- docs/Cleanup.md | 14 ++++++++++++++ docs/Grub.md | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 docs/Cleanup.md create mode 100644 docs/Grub.md diff --git a/docs/Cleanup.md b/docs/Cleanup.md new file mode 100644 index 0000000..4d11743 --- /dev/null +++ b/docs/Cleanup.md @@ -0,0 +1,14 @@ +# Cleanup + +This document refers to information about cleaning the system, such as deleting +old generations, unused nix shells, etc. + +## Delete Old Generations + +Run the following commands to clean the system up and delete old generations: + +```bash +nix-collect-garbage --delete-old +sudo nox-collect-garbage -d +sudo /run/current-system/bin/switch-to-configuration boot +``` diff --git a/docs/Grub.md b/docs/Grub.md new file mode 100644 index 0000000..5a7b4b7 --- /dev/null +++ b/docs/Grub.md @@ -0,0 +1,12 @@ +# Grub + +This document is for information regarding Grub. + +## Reinstall Grub + +If the grub install breaks and you ever need to reinstall grub, the following +command is how you do it: + +```bash +sudo NIXOS_INSTALL_BOOTLOADER=1 /nix/var/nix/profiles/system/bin/switch-to-configuration boot +```