nixos/roles/home/zsh.nix

23 lines
544 B
Nix
Raw Normal View History

2021-06-25 12:55:23 +01:00
{ config, pkgs, lib, ... }: {
programs.zsh = {
enable = true;
oh-my-zsh = {
enable = true;
plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ];
theme = "bira";
};
};
home.file.".bash_profile".text =
# not having the attribute users means
# we cannot change the default shell (e.g. this is not a NixOS host)
if ! builtins.hasAttr "users" config then ''
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
exec ${pkgs.zsh}/bin/zsh
'' else null;
2021-06-25 12:55:23 +01:00
}