make autorun optional

squash
This commit is contained in:
atagen 2025-02-06 11:28:02 +11:00
parent 9a8c417cbb
commit 32151a99d1
2 changed files with 18 additions and 10 deletions

View File

@ -3,6 +3,7 @@
pkgs ? import <nixpkgs>,
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

View File

@ -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;