From 3e707f5f93d7be40fd3e4182ed977446bdf2e2c3 Mon Sep 17 00:00:00 2001 From: SunOfLife1 Date: Thu, 14 May 2026 01:04:51 -0400 Subject: [PATCH] eww: remove shell integration Shell integration was only used to source completions on shell startup, but shell completions have been installed with eww by nixpkgs since December 2024 (https://github.com/NixOS/nixpkgs/commit/cc419ccaefba3540224c84a322449bbefe8b3c01) --- modules/programs/eww.nix | 52 ++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/modules/programs/eww.nix b/modules/programs/eww.nix index 56b3340e3..66b2c5a54 100644 --- a/modules/programs/eww.nix +++ b/modules/programs/eww.nix @@ -12,6 +12,22 @@ in { meta.maintainers = [ lib.hm.maintainers.mainrs ]; + imports = + map + ( + shell: + lib.mkRemovedOptionModule [ + "programs" + "eww" + "enable${shell}Integration" + ] "This option is no longer necessary. Shell completions are now installed with eww by nixpkgs." + ) + [ + "Bash" + "Zsh" + "Fish" + ]; + options.programs.eww = { enable = lib.mkEnableOption "eww"; @@ -26,38 +42,10 @@ in {file}`$XDG_CONFIG_HOME/eww`. ''; }; - - enableBashIntegration = lib.hm.shell.mkBashIntegrationOption { inherit config; }; - - enableFishIntegration = lib.hm.shell.mkFishIntegrationOption { inherit config; }; - - enableZshIntegration = lib.hm.shell.mkZshIntegrationOption { inherit config; }; }; - config = - let - ewwCmd = lib.getExe cfg.package; - in - mkIf cfg.enable { - home.packages = [ cfg.package ]; - xdg = mkIf (cfg.configDir != null) { configFile."eww".source = cfg.configDir; }; - - programs.bash.initExtra = mkIf cfg.enableBashIntegration '' - if [[ $TERM != "dumb" ]]; then - eval "$(${ewwCmd} shell-completions --shell bash)" - fi - ''; - - programs.zsh.initContent = mkIf cfg.enableZshIntegration '' - if [[ $TERM != "dumb" ]]; then - eval "$(${ewwCmd} shell-completions --shell zsh)" - fi - ''; - - programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' - if test "$TERM" != "dumb" - eval "$(${ewwCmd} shell-completions --shell fish)" - end - ''; - }; + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + xdg = mkIf (cfg.configDir != null) { configFile."eww".source = cfg.configDir; }; + }; }