From 7e2dcafcacdbf1078383c5c8e34aaa8e7d3ba428 Mon Sep 17 00:00:00 2001 From: Rei Meliesie Date: Mon, 12 Oct 2026 23:05:27 +0200 Subject: [PATCH] Add generations cleanup commmand as shell alias --- common.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common.nix b/common.nix index 3d38a37..3a7ba51 100644 --- a/common.nix +++ b/common.nix @@ -105,6 +105,13 @@ nsff = "nix-store-fuzzy-find"; nbp = "nix-build-pkg"; nd = "nix develop --command $SHELL"; + + # New commands. + + nixos-cleanup-generations = '' + zsh -c "nix-env --profile /nix/var/nix/profiles/system --delete-generations +20 && \ + /run/current-system/bin/switch-to-configuration boot" + ''; }; etc.vimrc.text = ''