forked from DGNum/infrastructure
41 lines
615 B
Nix
41 lines
615 B
Nix
{ pkgs, ... }:
|
|
|
|
let
|
|
substitutions = {
|
|
inherit (pkgs)
|
|
bash
|
|
colmena
|
|
coreutils
|
|
nvd
|
|
git
|
|
jq
|
|
;
|
|
attic = pkgs.attic-client;
|
|
};
|
|
|
|
mkShellScript =
|
|
name:
|
|
(pkgs.substituteAll (
|
|
{
|
|
inherit name;
|
|
src = ./. + "/${name}.sh";
|
|
dir = "/bin/";
|
|
isExecutable = true;
|
|
|
|
checkPhase = ''
|
|
${pkgs.stdenv.shellDryRun} "$target"
|
|
'';
|
|
}
|
|
// substitutions
|
|
));
|
|
|
|
scripts = [
|
|
"check-deployment"
|
|
"launch-vm"
|
|
"list-nodes"
|
|
"push-to-cache"
|
|
"cache"
|
|
];
|
|
in
|
|
|
|
builtins.map mkShellScript scripts
|