fish: Update nix aliases

* Refer to the home directory by its full path
* Refer to flakes using the `path:` URL
* Add aliases to wipe old generations
* Add `update` alias for calling all other aliases

Signed-off-by: George Kaklamanos <gkaklas@gkaklas.gr>
This commit is contained in:
George Kaklamanos 2024-08-03 16:23:25 +03:00
parent 396f4a4b86
commit d19e2f55ed
No known key found for this signature in database
GPG key ID: C0CAB8A6BDC9399D

View file

@ -26,10 +26,13 @@
"df" = "df -x tmpfs -x devtmpfs -x efivarfs -h";
# Nix
"nrs" = "sudo nixos-rebuild switch --flake ~gkaklas/nix/nixos/";
"upn" = "sudo nix flake update ~gkaklas/nix/nixos/";
"hms" = "home-manager switch --flake ~/nix/home-manager/";
"uph" = "nix flake update ~/nix/home-manager/ ";
"nrs" = "sudo nixos-rebuild switch --flake path:/home/gkaklas/nix/nixos/";
"upn" = "sudo nix flake update path:/home/gkaklas/nix/nixos/";
"cln" = "sudo nix profile wipe-history --older-than 7d --profile /nix/var/nix/profiles/system";
"hms" = "home-manager switch --flake path:/home/gkaklas/nix/home-manager/";
"uph" = "nix flake update path:/home/gkaklas/nix/home-manager/ ";
"clh" = "nix profile wipe-history --older-than 7d";
"update" = "upn && nrs && cln && uph && hms && clh && nix store gc";
# git
"gc" = "git commit --verbose --gpg-sign --signoff";