chore:fix nix final

This commit is contained in:
Rasyidan Akbar F. 2025-09-26 16:30:57 +07:00
commit d3984da4b4

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
inherit (lib) mkEnableOption mkIf mkOption types; inherit (lib) mkEnableOption mkIf mkMerge mkOption types;
cfg = config.rsydn.shell.zsh; cfg = config.rsydn.shell.zsh;
in { in {
options.rsydn.shell.zsh = { options.rsydn.shell.zsh = {
@ -60,24 +60,30 @@ in {
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable (mkMerge [
programs.zsh = { {
enable = true; programs.zsh = {
enableCompletion = true; enable = true;
autosuggestion.enable = cfg.enableAutoSuggestion; enableCompletion = true;
syntaxHighlighting.enable = cfg.enableSyntaxHighlighting; autosuggestion.enable = cfg.enableAutoSuggestion;
shellAliases = cfg.aliases; syntaxHighlighting.enable = cfg.enableSyntaxHighlighting;
initExtraBeforeCompInit = cfg.extraBeforeCompInit; shellAliases = cfg.aliases;
initExtraFirst = lib.optionalString cfg.enableVimMode '' initExtra = cfg.extraAfter;
oh-my-zsh = {
enable = true;
theme = cfg.theme;
plugins = cfg.plugins;
};
};
}
{
programs.zsh.initContent = lib.mkOrder 550 cfg.extraBeforeCompInit;
}
(mkIf cfg.enableVimMode {
programs.zsh.initContent = lib.mkBefore ''
bindkey -v bindkey -v
''; '';
initExtra = cfg.extraAfter; })
]);
oh-my-zsh = {
enable = true;
theme = cfg.theme;
plugins = cfg.plugins;
};
};
};
} }