nixos/modules/features/zsh.nix

35 lines
781 B
Nix
Raw Normal View History

2026-05-20 01:37:16 +00:00
{
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 --upgrade-all --flake $NIX_FLAKE_PATH#$HOSTNAME";
rebuild = "sudo nixos-rebuild switch --flake $NIX_FLAKE_PATH#$HOSTNAME";
};
};
};
}