nixconfig/modules/home/cli/zsh/default.nix
2023-11-04 02:28:27 +01:00

17 lines
541 B
Nix
Executable File

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