my system configurations ^-^
1{
2 lib,
3 osConfig,
4 config,
5 ...
6}: let
7 cfg = osConfig.settings.programs;
8in {
9 config = lib.mkIf (cfg.cli.enable
10 && cfg.categories.core.enable) {
11 programs.zsh = {
12 enable = true;
13 enableCompletion = true;
14 autosuggestion.enable = true;
15 syntaxHighlighting.enable = true;
16 shellAliases = {
17 ll = "ls -l";
18 };
19 history = {
20 size = 10000;
21 path = "${config.xdg.dataHome}/zsh/history";
22 };
23 initContent = ''
24 PROMPT_NEEDS_NEWLINE=false
25
26 precmd() {
27 if [[ "$PROMPT_NEEDS_NEWLINE" == true ]]; then
28 echo
29 fi
30 PROMPT_NEEDS_NEWLINE=true
31 }
32
33 clear() {
34 PROMPT_NEEDS_NEWLINE=false
35 command clear
36 }
37 '';
38 };
39 };
40}