Cleanup aliases

Make Xonsh aliases nicer
Organize the ones in my config
Enhance the cleanup alias to include home-manager generations
Create aliases as Python raw strings
This commit is contained in:
Greg Hellings
2024-08-20 22:43:31 -05:00
parent e4b4197991
commit d9153ca794
3 changed files with 20 additions and 9 deletions
+6
View File
@@ -110,6 +110,12 @@ def _bake(args):
copier copy @(str(templates / args[0])) .
aliases['bake'] = _bake
def _cleanup(args):
sudo nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager --older-than '30d'
sudo nix-collect-garbage --delete-older-than 30d
sudo nix store optimise
aliases['cleanup'] = _cleanup
###
#
# Other random nice-to-have things