summaryrefslogtreecommitdiff
path: root/nixhome/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'nixhome/Scripts')
-rwxr-xr-xnixhome/Scripts/nix_garbage7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixhome/Scripts/nix_garbage b/nixhome/Scripts/nix_garbage
new file mode 100755
index 0000000..449e807
--- /dev/null
+++ b/nixhome/Scripts/nix_garbage
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+set -x
+
+nix-env --delete-generations 10d
+home-manager expire-generations "-10 days"
+sudo nix-collect-garbage --delete-older-than 10d
+