make autorun optional
squash
This commit is contained in:
parent
9a8c417cbb
commit
32151a99d1
2 changed files with 18 additions and 10 deletions
14
default.nix
14
default.nix
|
@ -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
|
||||
|
|
14
ides.nix
14
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue