nix-dotfiles/snippets/zsh.nix

39 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2024-12-02 17:22:01 -05:00
{ pkgs, ... }: {
2024-05-09 00:49:01 -04:00
# Enabling bash from home-manager means environment variables set by HM get set correctly
# Worst case, fallback to bash.
programs.zsh = {
enable = true;
initExtra = ''
# Set prompt
2024-12-02 17:22:01 -05:00
# PS1='%(?..[%?] )%B%F{green}[%n@%m %~]%(!.#.$)%f%b '
2024-05-09 00:49:01 -04:00
'';
profileExtra = ''
export QT_SCALE_FACTOR_ROUNDING_POLICY=RoundPreferFloor
2024-12-24 15:58:45 -05:00
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
2024-05-09 00:49:01 -04:00
# If running from tty1 start sway
# [ "$(tty)" = "/dev/tty1" ] && exec sway
2024-05-09 00:49:01 -04:00
'';
defaultKeymap = "emacs";
2024-12-03 11:46:01 -05:00
# plugins = [
# {
# name = "pure";
# src = pkgs.fetchFromGitHub {
# owner = "sindresorhus";
# repo = "pure";
# rev = "v1.23.0";
# hash = "sha256-BmQO4xqd/3QnpLUitD2obVxL0UulpboT8jGNEh4ri8k=";
# };
# }
# {
# name = "zsh-syntax-highlighting";
# src = pkgs.fetchFromGitHub {
# owner = "zsh-users";
# repo = "zsh-syntax-highlighting";
# rev = "0.8.0";
# hash = "sha256-iJdWopZwHpSyYl5/FQXEW7gl/SrKaYDEtTH9cGP7iPo=";
# };
# }
# ];
2024-05-09 00:49:01 -04:00
};
}