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,17 +60,14 @@ in {
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable (mkMerge [
{
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
autosuggestion.enable = cfg.enableAutoSuggestion; autosuggestion.enable = cfg.enableAutoSuggestion;
syntaxHighlighting.enable = cfg.enableSyntaxHighlighting; syntaxHighlighting.enable = cfg.enableSyntaxHighlighting;
shellAliases = cfg.aliases; shellAliases = cfg.aliases;
initExtraBeforeCompInit = cfg.extraBeforeCompInit;
initExtraFirst = lib.optionalString cfg.enableVimMode ''
bindkey -v
'';
initExtra = cfg.extraAfter; initExtra = cfg.extraAfter;
oh-my-zsh = { oh-my-zsh = {
@ -79,5 +76,14 @@ in {
plugins = cfg.plugins; plugins = cfg.plugins;
}; };
}; };
}; }
{
programs.zsh.initContent = lib.mkOrder 550 cfg.extraBeforeCompInit;
}
(mkIf cfg.enableVimMode {
programs.zsh.initContent = lib.mkBefore ''
bindkey -v
'';
})
]);
} }