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

Attempt to call something which is not a function but a set #2

Closed
niklaswallerstedt opened this issue Feb 21, 2017 · 7 comments
Closed

Comments

@niklaswallerstedt
Copy link
Contributor

This seems like a very interesting repo, however I'm having some trouble getting it to run on Virtualbox on my mac. I'm new to Nix, so maybe I'm missing something. Any help would be appreciated.

deploy/manage vbox create '<server/logical.vbox.nix>' '<server/physical.vbox.nix>'
created deployment ‘7c1eaaf3...'
deploy/manage vbox deploy
error: attempt to call something which is not a function but a set, at ... wordpress-nginx-nix/server/physical.vbox.nix:1:6
deploy/manage vbox deploy --show-trace
error: while evaluating ‘flip’ at /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/trivial.nix:82:16, called from /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:264:7:
while evaluating ‘mapAttrs’ at /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/attrsets.nix:198:17, called from /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/trivial.nix:82:19:
while evaluating ‘zipAttrsWith’ at /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/attrsets.nix:346:21, called from /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:31:13:
while evaluating ‘zipAttrsWithNames’ at /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/attrsets.nix:331:33, called from /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/attrsets.nix:346:27:
while evaluating ‘concatMap’ at /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/lists.nix:79:18, called from /nix/store/1lgppap4jzgw7gq8zdnma4pfcsm1ggqq-nixexprs.tar.xz/lib/attrsets.nix:346:46:
while evaluating ‘operator’ at /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:25:20, called from undefined position:
while evaluating ‘getNetworkFromExpr’ at /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:18:28, called from /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:25:45:
while evaluating ‘call’ at /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:29:10, called from /nix/store/acwqszlzgai4h1dl8rvspbd439l633va-1gy62jcxjc09n9gk0ns4qk3d9b9kcda7-nixops-1.5pre2121_fc43d9c/share/nix/nixops/eval-machine-info.nix:19:10:
while evaluating the file ‘... wordpress-nginx-nix/server/physical.vbox.nix’:
attempt to call something which is not a function but a set, at ... wordpress-nginx-nix/server/physical.vbox.nix:1:6
error: evaluation of the deployment specification failed

macOS 10.12.3
nix-env (Nix) 1.11.6
NixOps 1.5 (installed prior to finding this repo)
Virtualbox 5.0.16r105871

@3noch
Copy link
Member

3noch commented Feb 21, 2017

@niklaswallerstedt My first beta tester! ;) I'm using a variation of this repo for my own projects, but I may have missed something in the template. I'll let you know what I find. Have you made any changes?

@3noch
Copy link
Member

3noch commented Feb 21, 2017

Oops, sure enough I have a minor mistake. I'll push up a change.

@niklaswallerstedt
Copy link
Contributor Author

Awesome, looking forward to it! I'll be beta testing away while learning nix! :)

@3noch
Copy link
Member

3noch commented Feb 21, 2017

@niklaswallerstedt Great. :D I have a fix in place but I noticed that my documentation for building this server on macOS is not complete. Unfortunately some of the server's dependencies need to be bootstrapped with a Linux build machine. There are decent solutions to this (using nix or docker) and I'll try to have some more docs up within a day or so.

@3noch 3noch closed this as completed in 82b2e3e Feb 23, 2017
@3noch
Copy link
Member

3noch commented Feb 23, 2017

@niklaswallerstedt Ok everything should be good to go. Thanks to you I finally finished a bunch of items on my todo list that were very near the bottom. :) I'm glad to have cleared up some of these things.

One thing lingers. I'll update the README as soon as its officially out, but in the meantime you'll want to know about this script. If you install Docker and run that script, it will create a NixOS build slave in a docker container. Nix builds and nixops deployments will automatically use the build slave when needed. Eventually I hope this script will actually be part of @LnL7's repo (PR at LnL7/nix-docker#5) at which point I'll document it in my README. You should be able to just do this and get it working:

source <(curl -fsSL https://raw.githubusercontent.com/LnL7/nix-docker/master/start-docker-nix-build-slave)

Note that it sets an environment variable so you'll need to do this for any new shell that needs to run deployments.

Of course I'm eager to hear how things go and be sure to file issues if you run into problems.

I have a lot of documentation to add to this repository, so until then you can file issues. I'm also eacameron on Freenode IRC channels.

@3noch
Copy link
Member

3noch commented Feb 23, 2017

@niklaswallerstedt One quick note: If you're expecting a rather traditional WordPress deployment, set freezeWordPress = false; in the default-app-config.nix file. Otherwise the deployment uses nix packaging to handle WordPress, plugins, and themes. That's more work but it does have benefits.

@niklaswallerstedt
Copy link
Contributor Author

@3noch Thank you very much for a quick turnaround, I can confirm that it is now working and I can get it to build successfully. I think it did build properly without the build slave (tried both with the same end result at least). Worked really neat with the build slave though!

I've got some additional questions but I can open separate issues for them.

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