Skip to content

Feature request?: unbuffer as a boolean for custom services/processes #454

Description

@bennyandresen

Hey there,

thanks for the project. I was looking for having NixOS-like services outside of NixOS and this project had the best documentation to create a custom service.

Sometimes some projects are not happy with whatever process-compose is doing and the pseudo-tty or the lack thereof and the processes fail in weird ways.

What do you think about a convenient ability to toggle the use of unbuffer from the expect package for such services?

unbuffer helped me in devenv when I used tailwindcss and now also in services-flake with my custom service.

this is what I ended up with using my custom service and I can imagine having better UX around that when using process-compose more heavily.

      processes."${name}" = {
        command = pkgs.writeShellApplication {
          name = "unbuffered-datomic";
          runtimeInputs = [ pkgs.expect ];
          text = "exec unbuffer ${startScript}/bin/start-datomic";
        };
        depends_on."${name}-init".condition = "process_completed_successfully";
        availability = {
          restart = "on_failure";
          max_restarts = 2;
        };
      };

EDIT:
The imagined configuration could be

      processes."${name}-init" = { command = setupScript; unbuffer = true; };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions