chore:fix nix final
This commit is contained in:
parent
f9c294adae
commit
d3984da4b4
1 changed files with 25 additions and 19 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
inherit (lib) mkEnableOption mkIf mkMerge mkOption types;
|
||||
cfg = config.rsydn.shell.zsh;
|
||||
in {
|
||||
options.rsydn.shell.zsh = {
|
||||
|
|
@ -60,17 +60,14 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = cfg.enableAutoSuggestion;
|
||||
syntaxHighlighting.enable = cfg.enableSyntaxHighlighting;
|
||||
shellAliases = cfg.aliases;
|
||||
initExtraBeforeCompInit = cfg.extraBeforeCompInit;
|
||||
initExtraFirst = lib.optionalString cfg.enableVimMode ''
|
||||
bindkey -v
|
||||
'';
|
||||
initExtra = cfg.extraAfter;
|
||||
|
||||
oh-my-zsh = {
|
||||
|
|
@ -79,5 +76,14 @@ in {
|
|||
plugins = cfg.plugins;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
programs.zsh.initContent = lib.mkOrder 550 cfg.extraBeforeCompInit;
|
||||
}
|
||||
(mkIf cfg.enableVimMode {
|
||||
programs.zsh.initContent = lib.mkBefore ''
|
||||
bindkey -v
|
||||
'';
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue