refactor to fix dependency on 'osConfig' arg

This commit is contained in:
greyweather committed 2026-08-28 05:26:46 +01:00
1 parent 1c1174edd3
commit 22d431e271
11 files changed
+86 -55

No files matched your search

+10 -3
View File
@@ -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"