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,21 +1,8 @@
{config, ...}: {
{
imports = [
# Common modules
./home.nix
./users/jimbo.nix
./tuiapps/git.nix
];
# ZSH rebuild commands
programs.zsh = {
shellAliases = let
auth = import ./common/auth.nix;
hostname = "JimServer";
in {
flakedate = "${auth.method} nix flake update /etc/nixos";
sysswitch = "${auth.method} nixos-rebuild switch --flake /etc/nixos/.#${hostname}";
homeswitch = "home-manager switch --flake /etc/nixos/.#jimbo@${hostname}";
nixdate = "flakedate; sysswitch; homeswitch; notify-send 'NixOS switch done.'";
};
};
}