Skip to content

how do i make myself owner of the server process #1

Open

Description

@ggleb2023

when i type start-database it says
creating directory /.pgroot/PG_DATA ... initdb: error: could not create directory "/.pgroot": Permission denied

the only thing i changed in flake is this:


shellHook = ''
              export PG_ROOT="$pwd/.pgroot"
              echo "db path set to $PG_ROOT"
            '';

Activity

  1. hermann-p commented on Feb 17, 2026

    @hermann-p
    Owner

    Can you show your flake? I think you're in a Situation where $pwd points to the nix store location containing your dev-shell dependencies. You could test that by using an absolute path or some path starting from $HOME.

    Btw, nowadays you might consider using devenv, which gives you a declarative layer around nix files. In there it's as easy as services.postgres.enable = true plus sugar for most options a typical dev needs (the process manager is what sold me).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions