48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.modules.shell.zsh;
|
|
in {
|
|
options.modules.shell.zsh = { enable = mkOption { default = false; }; };
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.file = { ".config/starship.toml".source = ./starship.toml; };
|
|
|
|
home.packages = with pkgs; [ starship ];
|
|
|
|
programs.starship = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
};
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
|
|
initExtra = builtins.readFile ./key-bindings.zsh
|
|
+ builtins.readFile ./functions.zsh
|
|
+ builtins.readFile ./last-working-dir.zsh
|
|
+ builtins.readFile ./dir-navigation.zsh;
|
|
|
|
zplug = {
|
|
enable = true;
|
|
plugins = [
|
|
# list of plugins: https://github.com/unixorn/awesome-zsh-plugins
|
|
{ name = "agkozak/zsh-z"; }
|
|
{
|
|
name = "zsh-users/zsh-completions";
|
|
}
|
|
|
|
# make it behave like fish
|
|
{ name = "zsh-users/zsh-autosuggestions"; }
|
|
{ name = "zsh-users/zsh-history-substring-search"; }
|
|
{
|
|
name = "zsh-users/zsh-syntax-highlighting";
|
|
} # must be last sourced plugin
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|