Homogonize the system switch aliases

This commit is contained in:
Jimbo 2024-09-10 15:29:32 -04:00
parent cbefbefc15
commit c1b6c7a255
6 changed files with 13 additions and 62 deletions

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {
{pkgs, config, ...}: {
programs.zsh = let
auth = import ../common/auth.nix;
nixcfg = import ../common/nixcfg.nix;
@ -18,6 +18,13 @@
nixpurge = "${auth.method} nix-collect-garbage --delete-old; notify-send 'NixOS generation removed.'";
nixoptimize = "${auth.method} nix store optimise; notify-send 'NixOS store optimization finished.'";
# Flake commands
flakedate = "${auth.method} nix flake update /etc/nixos";
sysswitch = "${auth.method} nixos-rebuild switch --flake /etc/nixos";
homeswitch = "home-manager switch --flake /etc/nixos";
nixswitch = "sysswitch; homeswitch; notify-send 'NixOS switch done.'";
nixdate = "flakedate && sysswitch; homeswitch; notify-send 'NixOS update done.'";
# Shortcut aliases
neo = "clear && fastfetch";
ip = "ip -c";
@ -39,9 +46,6 @@
opusdl = "ytdl --recode-video opus";
ytopus = "opusdl --format 251";
spotdl = "spotdl --m3u --format opus";
# Flakes
buildiso = "${pkgs.nixos-generators}/bin/nixos-generate -f install-iso -c /home/jimbo/Downloads/NixISO/configuration.nix";
};
initExtra = ''
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch