Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overmind socket not set when using devenv in flake #1315

Open
jonknapp opened this issue Jul 3, 2024 · 0 comments
Open

overmind socket not set when using devenv in flake #1315

jonknapp opened this issue Jul 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jonknapp
Copy link
Contributor

jonknapp commented Jul 3, 2024

Describe the bug
While overmind is present in the cli, running any of its commands (like overmind connect web) fails to connect since it's expecting .overmind.sock to exist by default. I believe this was introduced with this commit.

To reproduce

# example flake
{
  inputs = {
    devenv = {
      url = "github:cachix/devenv";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    systems.url = "github:nix-systems/default";
  };

  outputs = { self, devenv, nixpkgs, systems, ... } @ inputs:
    let
      forEachSystem = nixpkgs.lib.genAttrs (import systems);
    in
    {
      # https://github.com/cachix/devenv/issues/756
      packages = forEachSystem (system: {
        devenv-up = self.devShells.${system}.default.config.procfileScript;
      });
      devShells = forEachSystem
        (system:
          let
            pkgs = import nixpkgs {
              inherit system;
            };
          in
          {
            default = devenv.lib.mkShell {
              inherit inputs pkgs;
              modules = [
                {
                  name = "app";

                  # env.OVERMIND_SOCKET = "./.devenv/run/overmind.sock";

                  process.implementation = "overmind";
                  processes = {
                    one.exec = "sleep 100";
                  };
                }
              ];
            };
          });
    };
}
  1. Start it with devenv up
  2. Open a new terminal window and run overmind status
  3. You'll see something like overmind: dial unix ./.overmind.sock: connect: no such file or directory instead of the command output if you would have specified the path to overmind's socket at .direnv/run/overmind.sock

Version

devenv: 1.0.7 and I'm using flakes.

Workaround

If I specify something like env.OVERMIND_SOCKET = "./.devenv/run/overmind.sock"; in my devenv config, it will then allow overmind commands to use the correct socket.

@jonknapp jonknapp added the bug Something isn't working label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant