2024-04-01 22:52:49 +02:00
|
|
|
{materusArg, config, pkgs, lib, ...}:
|
|
|
|
let
|
|
|
|
cfg = config.materus.profile.zsh;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.materus.profile.zsh.enable = materusArg.pkgs.lib.mkBoolOpt true "Enable materus system zsh config";
|
|
|
|
config = lib.mkIf cfg.enable {
|
2024-04-06 15:10:57 +02:00
|
|
|
users.defaultUserShell = pkgs.zsh;
|
2024-04-06 15:20:44 +02:00
|
|
|
environment.shells = [ pkgs.zsh ];
|
2024-04-01 22:52:49 +02:00
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
|
|
|
enableGlobalCompInit=false;
|
|
|
|
interactiveShellInit = ''
|
2024-04-06 15:10:57 +02:00
|
|
|
if [[ $(${pkgs.coreutils}/bin/echo $TTY | ${pkgs.gnugrep}/bin/grep "/dev/tty") ]] && [[ "$TERM" == "linux" ]]; then
|
|
|
|
setfont lat2-16 -m 8859-2
|
|
|
|
fi
|
|
|
|
|
2024-04-01 22:52:49 +02:00
|
|
|
if [[ ''${__MATERUS_HM_ZSH:-0} == 0 ]]; then
|
|
|
|
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
promptInit = ''
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|