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

.envrc ignored by direnv #2

Open
antislava opened this issue Feb 5, 2019 · 3 comments
Open

.envrc ignored by direnv #2

antislava opened this issue Feb 5, 2019 · 3 comments

Comments

@antislava
Copy link

antislava commented Feb 5, 2019

Apparently, eval "$(direnv hook <shell>)" needs to be run, in which case it has be mentioned in the README.md.
This command can also be added to the respective ~/.<shell>rc, or, better yet, to the shellHook of the shell.nix (probably along with direnv allow?):

    shellHook = drv.shellHook + ''
      export PGDATA=$PWD/database/pgdata
      mkdir -p $PGDATA

      mkdir -p $PWD/logs

      eval "$(direnv hook $SHELL)"
      direnv allow
    '';
@bradparker
Copy link
Owner

bradparker commented Feb 5, 2019

Hey, thanks! I'll give it a shot later this evening. I really need to do a little testing with --pure to make sure that the nix setup is as plug and play as I'd like it to be.

Did you otherwise get it running OK? My other concern is the PostgreSQL setup ... I get a left-over pid file from time to time.

@antislava
Copy link
Author

Yes, everything worked really well (I haven't looked into it in much detail yet but all the tests passed OK, haven't noticed any issues with the PostgreSQL setup, but I am planning to continue playing with it).

Thanks for your work - I think this kind of complete examples are really useful!

ps you may also want to take a look at https://github.com/basvandijk/nixtodo (a fullstack web-app, implementing alternative deployment options using nixops), if you haven't seen it already.

@bradparker
Copy link
Owner

No worries. I've been meaning to share this around for a couple of weeks actually, so I'm really glad you found it. There are still a few more things I'd like to have before it's really complete. I'd really like metrics and error reporting (or something along those lines).

Thanks for the link, I'm very keen to see more NixOps strategies. Also Hydra, I haven't look into setting up a Hydra server at all yet. This Nix stuff, it's real good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants