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, ... }:
|
{ 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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue