{
  # 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
      PS1='%(?..[%?] )%B%F{green}[%n@%m %~]%(!.#.$)%f%b '
    '';
    profileExtra = ''
      export QT_SCALE_FACTOR_ROUNDING_POLICY=RoundPreferFloor
      # If running from tty1 start sway
      [ "$(tty)" = "/dev/tty1" ] && exec sway
    '';
    defaultKeymap = "emacs";
  };
}
