nixos/roles/home/zsh.nix

29 lines
770 B
Nix
Raw Normal View History

2023-12-02 17:41:15 +00:00
{ pkgs, lib, ... }:
2023-03-19 19:23:48 +00:00
{
home.packages = with pkgs; [ any-nix-shell ];
2021-06-25 12:55:23 +01:00
programs.zsh = {
enable = true;
oh-my-zsh = {
enable = true;
plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ];
theme = "bira";
};
2023-09-26 20:17:56 +01:00
enableAutosuggestions = false;
dotDir = ".config/zsh";
initExtra = ''
# avoid macOS updates to destroy nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
source '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
any-nix-shell zsh --info-right | source /dev/stdin
2023-06-01 20:09:04 +01:00
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
2023-12-02 17:41:15 +00:00
${if pkgs.stdenv.isDarwin then "export PATH=$PATH:/opt/homebrew/bin" else ""}
'';
};
2021-06-25 12:55:23 +01:00
}
2023-06-01 20:09:04 +01:00