https://github.com/srid/proc-flake
A `flake-parts` module for running multiple processes in a dev shell
https://github.com/srid/proc-flake
flake-parts nix
Last synced: 10 months ago
JSON representation
A `flake-parts` module for running multiple processes in a dev shell
- Host: GitHub
- URL: https://github.com/srid/proc-flake
- Owner: srid
- License: mit
- Created: 2022-12-10T18:35:20.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-19T02:22:57.000Z (about 2 years ago)
- Last Synced: 2025-08-02T01:10:18.752Z (11 months ago)
- Topics: flake-parts, nix
- Language: Nix
- Homepage:
- Size: 17.6 KB
- Stars: 25
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# proc-flake
A [`flake-parts`](https://flake.parts/) Nix module for running multiple processes in a dev shell.
[honcho](https://github.com/nickstenning/honcho) is used to launch the processes.
## Usage
NOTE: this module requires the [flake-root](https://github.com/srid/flake-root) module.
```nix
proc.groups.run.processes = {
haskell.command = "${lib.getExe pkgs.haskellPackages.ghcid}";
tailwind.command = "${lib.getExe pkgs.haskellPackages.tailwind} -w -o ./static/tailwind.css './src/**/*.hs'";
};
```
This gives a `config.proc.groups.run.package` derivation that you can put in the `nativeBuildInputs` of devShell for availability in the shell.
For better discoverability, consider using this in conjunction with the [mission-control](https://github.com/Platonic-Systems/mission-control) module.
## Examples
- https://github.com/EmaApps/ema-template
## Credits
The idea for this module came largely from Domen Kožar's [devenv project](https://devenv.sh/processes/).
## Alternatives
For a similar module that uses a more advanced tool called `process-compose`, see https://github.com/Platonic-Systems/process-compose-flake