nixos/roles/home/zsh.nix
Giulio De Pasquale 9abf353f88 fix(nix): update stateVersion and remove adb plugin
- Updated `stateVersion` to "24.11"
- Removed `adb` from the list of oh-my-zsh plugins in `zsh.nix`
2024-11-18 19:58:32 +00:00

34 lines
917 B
Nix

{ pkgs, ... }:
let
commitFunctions = pkgs.writeTextDir "bin/commits.sh" (builtins.readFile ./scripts/commits.sh);
in
{
home.packages = with pkgs; [ any-nix-shell ];
programs.zsh = {
enable = true;
oh-my-zsh = {
enable = true;
plugins = [ "git" "sudo" "docker" "docker-compose" "systemd" ];
theme = "bira";
};
autosuggestion.enable = 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
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
${if pkgs.stdenv.isDarwin then "export PATH=$PATH:/opt/homebrew/bin" else ""}
source ${commitFunctions}/bin/commits.sh
'';
};
}