Packages of enabled services
services-flake uses mkShell function to provide a shell with packages of all the enabled services.
# Inside `perSystem`
{
process-compose."my-pc" = { ... };
devShells.default = pkgs.mkShell {
inputsFrom = [
config.process-compose."my-pc".services.outputs.devShell
];
# ...
};
}process-compose app
Add the process-compose app in the devShell environment and run the app with my-pc (example configuration below) instead of nix run .#my-pc.
This is useful when the process(es) assume the devShell environment. For example, see here, cabal run (instead of nix run) is used to start the Nammayatri process when useCabal option is true. Additionally, avoiding nix run .#my-pc on large monorepos saves on eval-time costs in dirty worktree.
Note
Disallowing nix run .#my-pc in your flake requires https://github.com/Platonic-Systems/process-compose-flake/issues/27
{
perSystem = { self', ... }: {
process-compose."my-pc" = {
# ...
};
devShells.default = pkgs.mkShell {
packages = [
self'.packages."my-pc"
];
# ...
};
};
}