refactor to fix dependency on 'osConfig' arg
This commit is contained in:
11 files changed
+86
-55
No files matched your search
@@ -9,16 +9,23 @@
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
users.users."grey".shell = pkgs.zsh;
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
features.shells.zsh.enable = true;
|
||||
features.shells.zsh.antidote.enable = lib.mkIf (config.features.shells.zsh.antidote.enable) true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
flake.homeModules.global = { pkgs, osConfig, config, lib, ... }: {
|
||||
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
||||
options.features.shells.zsh = {
|
||||
enable = lib.mkEnableOption "zsh";
|
||||
antidote.enable = lib.mkEnableOption "antidote";
|
||||
};
|
||||
|
||||
config = (if (builtins.tryEval osConfig).success then (lib.mkIf (osConfig.features.shells.zsh.enable || config.features.shells.zsh.enable)) else (lib.mkIf (config.features.shells.zsh.enable))) {
|
||||
config = lib.mkIf (config.features.shells.zsh.enable) {
|
||||
home.shell.enableZshIntegration = true;
|
||||
|
||||
programs.kitty.shellIntegration.enableZshIntegration = true;
|
||||
@@ -26,7 +33,7 @@
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
completionInit = "";
|
||||
antidote = (if (builtins.tryEval osConfig).success then (lib.mkIf (osConfig.features.shells.zsh.antidote.enable || config.features.shells.zsh.antidote.enable)) else (lib.mkIf (config.features.shells.zsh.antidote.enable))) {
|
||||
antidote = lib.mkIf (config.features.shells.zsh.antidote.enable) {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"getantidote/use-omz"
|
||||
|
||||
Reference in new issue
Block a user