From 856b01ebd1de3f53c3929ce8082d9d67d799d816 Mon Sep 17 00:00:00 2001 From: Malix - Alix Brunet Date: Sat, 21 Mar 2026 17:38:28 +0100 Subject: [PATCH] shell: DRY shellIntegrationParameters --- modules/misc/shell.nix | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/modules/misc/shell.nix b/modules/misc/shell.nix index 7ef8bbfc..c1a87340 100644 --- a/modules/misc/shell.nix +++ b/modules/misc/shell.nix @@ -1,5 +1,11 @@ { config, lib, ... }: +let + shellIntegrationParameters = { + inherit config; + baseName = "Shell"; + }; +in { options.home.shell = { enableShellIntegration = lib.mkOption { @@ -19,25 +25,10 @@ ''; }; - enableBashIntegration = lib.hm.shell.mkBashIntegrationOption { - inherit config; - baseName = "Shell"; - }; - enableFishIntegration = lib.hm.shell.mkFishIntegrationOption { - inherit config; - baseName = "Shell"; - }; - enableIonIntegration = lib.hm.shell.mkIonIntegrationOption { - inherit config; - baseName = "Shell"; - }; - enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption { - inherit config; - baseName = "Shell"; - }; - enableZshIntegration = lib.hm.shell.mkZshIntegrationOption { - inherit config; - baseName = "Shell"; - }; + enableBashIntegration = lib.hm.shell.mkBashIntegrationOption shellIntegrationParameters; + enableFishIntegration = lib.hm.shell.mkFishIntegrationOption shellIntegrationParameters; + enableIonIntegration = lib.hm.shell.mkIonIntegrationOption shellIntegrationParameters; + enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption shellIntegrationParameters; + enableZshIntegration = lib.hm.shell.mkZshIntegrationOption shellIntegrationParameters; }; }