diff --git a/default.nix b/default.nix index 981c1b5..a9e9c90 100644 --- a/default.nix +++ b/default.nix @@ -3,6 +3,7 @@ pkgs ? import , shell ? pkgs.mkShell, modules ? [ ], + auto ? true, ... }: # shell creation args @@ -28,14 +29,11 @@ let # ides ./ides.nix # service config and build params - ( - _: - { - inherit services; - _buildIdes.shellFn = shell; - _buildIdes.shellArgs = shellArgs; - } - ) + (_: { + inherit services auto; + _buildIdes.shellFn = shell; + _buildIdes.shellArgs = shellArgs; + }) ] ++ baseModules ++ modules diff --git a/ides.nix b/ides.nix index 7475963..f782615 100644 --- a/ides.nix +++ b/ides.nix @@ -330,10 +330,20 @@ restart ]; shellHook = + let + autoRun = + if config.auto then + '' + ides run + '' + else + ""; + in (shellArgs.shellHook or "") + '' - ides - ''; + ides help + '' + + autoRun; }; in config._buildIdes.shellFn final;