add gc function

This commit is contained in:
2026-06-13 10:25:08 +02:00
parent 44ebc4676c
commit a1f3c82218
+4
View File
@@ -49,6 +49,10 @@
bindkey "^[OA" up-line-or-beginning-search bindkey "^[OA" up-line-or-beginning-search
bindkey "^[OB" down-line-or-beginning-search bindkey "^[OB" down-line-or-beginning-search
function gc() {
sudo nix-collect-garbage --delete-older-than "''${1:-14}d"
}
function mkenv() { function mkenv() {
local template="$HOME/nixos-dotfiles/templates/shell-''${1}.nix" local template="$HOME/nixos-dotfiles/templates/shell-''${1}.nix"
if [[ -z "$1" ]]; then if [[ -z "$1" ]]; then