nixos/modules/features/zsh.nix
2026-06-09 11:24:15 -04:00

34 lines
767 B
Nix

{
flake.nixosModules.zsh = { pkgs, ... }: {
environment.systemPackages = with pkgs; [
zsh
oh-my-zsh
];
environment.variables = {
NIX_FLAKE_PATH = "$HOME/.nix/";
};
programs.zsh = {
enable = true;
enableBashCompletion = true;
enableCompletion = true;
autosuggestions.enable = true;
ohMyZsh = {
enable = true;
theme = "bira";
plugins = [
"sudo"
"git"
];
};
shellAliases = {
ll = "ls -la";
update = "sudo nix flake update --flake $NIX_FLAKE_PATH && sudo nixos-rebuild switch --flake $NIX_FLAKE_PATH#$HOSTNAME";
rebuild = "sudo nixos-rebuild switch --flake $NIX_FLAKE_PATH#$HOSTNAME";
};
};
};
}