summaryrefslogtreecommitdiff
path: root/nixhome
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-06-06 16:58:32 +0200
committerJulian T <julian@jtle.dk>2021-06-06 16:58:32 +0200
commit47d6427fa6d706b749636b49daae415df6c990b5 (patch)
treebeb968648cec3c82d78dadc832af84e8f65ea6dd /nixhome
parent894a7cda68112c77c0fd98cad9cf1517aabb4cfa (diff)
Add nix_garbage collect script
Diffstat (limited to 'nixhome')
-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
+