dendritic migration
dendritic migration
This commit is contained in:
26
modules/apps.nix
Normal file
26
modules/apps.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{inputs, ...}: {
|
||||
perSystem = {
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
mkApp = name: {
|
||||
type = "app";
|
||||
program = "${(pkgs.writeShellScriptBin name ''
|
||||
PATH=${pkgs.git}/bin:$PATH
|
||||
echo "Running ${name} for ${system}"
|
||||
exec ${inputs.self}/apps/${system}/${name} "$@"
|
||||
'')}/bin/${name}";
|
||||
};
|
||||
appNames = ["apply" "build" "build-switch" "rollback"];
|
||||
in {
|
||||
apps =
|
||||
pkgs.lib.genAttrs appNames mkApp
|
||||
// {
|
||||
deploy = {
|
||||
type = "app";
|
||||
program = "${inputs.deploy-rs.packages.${system}.deploy-rs}/bin/deploy";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user