{ config, pkgs, lib, ... }: let inherit (pkgs.lib) optionalString; # not having the attribute users means # we cannot change the default shell (e.g. this is not a NixOS host) exec_zsh = '' # if [ -f "$HOME/.bashrc" ]; then # . "$HOME/.bashrc" # fi exec ${pkgs.zsh}/bin/zsh ''; in { programs.zsh = { enable = true; oh-my-zsh = { enable = true; plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ]; theme = "bira"; }; }; home.file.".bashrc".text = '' ${optionalString (!builtins.hasAttr "users" config) "${exec_zsh}"} ''; }