os-config: set zsh as default shell for users

This commit is contained in:
Mateusz Słodkowicz 2024-04-06 15:10:57 +02:00
parent f374e1a698
commit 4cd531103a
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
1 changed files with 5 additions and 0 deletions

View File

@ -5,10 +5,15 @@ in
{
options.materus.profile.zsh.enable = materusArg.pkgs.lib.mkBoolOpt true "Enable materus system zsh config";
config = lib.mkIf cfg.enable {
users.defaultUserShell = pkgs.zsh;
programs.zsh = {
enable = true;
enableGlobalCompInit=false;
interactiveShellInit = ''
if [[ $(${pkgs.coreutils}/bin/echo $TTY | ${pkgs.gnugrep}/bin/grep "/dev/tty") ]] && [[ "$TERM" == "linux" ]]; then
setfont lat2-16 -m 8859-2
fi
if [[ ''${__MATERUS_HM_ZSH:-0} == 0 ]]; then
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
fi