nixconfig/home/cli/zsh/default.nix
2023-10-12 16:16:29 +02:00

23 lines
748 B
Nix
Executable File

{
pkgs,
...
}:
let
nixflake_dir = "$HOME/files/nixconfig";
in {
programs.zsh = {
enable = true;
shellAliases = {
"sudo" = "sudo ";
"devsh-dl" = "nix develop --profile /tmp/devsh-env ${nixflake_dir} -c zsh";
"devsh" = "nix develop --profile /tmp/devsh-env ${nixflake_dir} -c zsh";
"nixu" = "(cd ${nixflake_dir} && nix flake update)";
"nixb" = "(cd ${nixflake_dir} && sudo nixos-rebuild switch --flake ./)";
"nixf" = "sudo echo 'Full Update' && echo 'Update lock' && nixu && echo 'Building new' && nixb && (devsh && exit) ";
"nixgcf" = "sudo nix-collect-garbage -d && nix-collect-garbage -d";
"ssh" = "TERM=xterm-256color ${pkgs.openssh}/bin/ssh";
"top" = "btop";
};
};
}