41 lines
1.5 KiB
Nix
41 lines
1.5 KiB
Nix
{ inputs, self, ... }: {
|
|
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, ... }: {
|
|
options.features.shells.zsh = {
|
|
enable = lib.mkEnableOption "`zsh`";
|
|
antidote.enable = lib.mkEnableOption "Antidote, a plugin manager for `zsh`";
|
|
};
|
|
})) ];
|
|
|
|
flake.nixosModules.global = { config, pkgs, lib, ... }: {
|
|
config = lib.mkIf (config.features.shells.zsh.enable || config.features.shells.defaultShell == "zsh") {
|
|
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
|
|
features.shells.zsh.enable = lib.mkDefault true;
|
|
features.shells.zsh.antidote.enable = lib.mkDefault config.features.shells.zsh.antidote.enable;
|
|
};
|
|
};
|
|
};
|
|
|
|
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
|
config = lib.mkIf (config.features.shells.zsh.enable || config.features.shells.defaultShell == "zsh") {
|
|
home.shell.enableZshIntegration = true;
|
|
|
|
programs.kitty.shellIntegration.enableZshIntegration = true;
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
completionInit = "";
|
|
antidote = lib.mkIf (config.features.shells.zsh.antidote.enable) {
|
|
enable = true;
|
|
plugins = [
|
|
"getantidote/use-omz"
|
|
"ohmyzsh/ohmyzsh path:lib"
|
|
"ohmyzsh/ohmyzsh path:plugins/command-not-found"
|
|
"ohmyzsh/ohmyzsh path:themes/nanotech.zsh-theme"
|
|
"zsh-users/zsh-autosuggestions"
|
|
"zdharma-continuum/fast-syntax-highlighting"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
} |