@@ -121,14 +121,14 @@ In order to add package dependencies, declare them under the build-depends field
121121
122122### Adding package overrides
123123
124−To add a version override to any Haskell package, or to add a Haskell package that doesn't exist in the nixpkgs used by Obelisk, use the `overrides` attribute in your project's `default.nix`. For example, to use a specific version of the `aeson` package, your `default.nix` will look like:
124+To add a version override to any Haskell package, or to add a Haskell package that doesn't exist in the nixpkgs used by Obelisk, use the `overrides` attribute in your project's `default.nix`. For example, to use a specific version of the `aeson` package fetched from GitHub and a specific version of the `waargonaut` package fetched from Hackage, your `default.nix` will look like:
125125
126126```nix
127127# ...
128128project ./. ({ pkgs, ... }: {
129129# ...
130130 overrides = self: super: let
131− aeson = pkgs.fetchFromGitHub {
131+ aesonSrc = pkgs.fetchFromGitHub {
132132 owner = "obsidiansystems";
133133 repo = "aeson-gadt-th";
134134 rev = "ed573c2cccf54d72aa6279026752a3fecf9c1383";
@@ -136,7 +136,12 @@ project ./. ({ pkgs, ... }: {
136136 };
137137 in
138138 {
139− aeson = self.callCabal2nix "aeson" aeson {};
139+ aeson = self.callCabal2nix "aeson" aesonSrc {};
140+ waargonaut = self.callHackageDirect {
141+ pkg = "waargonaut";
142+ ver = "0.8.0.1";
143+ sha256 = "1zv28np3k3hg378vqm89v802xr0g8cwk7gy3mr77xrzy5jbgpa39";
144+ } {};
140145 };
141146# ...
142147```
@@ -150,14 +155,16 @@ For further information see [the Haskell section](https://nixos.org/nixpkgs/manu
150155Build everything:
151156
152157```
153−nix-build -A exe -o result-exe
158+nix-build -A exe --no-out-link
154159```
155160
156−Run the server:
161+Copy the result to a new directory, add configuration, and run!
157162
158163```
159−cd result-exe
160−./backend
164+mkdir test-app
165+ln -s $(nix-build -A exe --no-out-link)/* test-app/
166+cp -r config test-app
167+(cd test-app && ./backend)
161168```
162169
163170### EC2
@@ -189,9 +196,11 @@ ob deploy init \
189196 ~/code/myapp-deploy
190197```
191198
192−NOTE: HTTPS is enabled by default; to disable https, pass `--disable-https` to the `ob deploy init` command above.
199+HTTPS is enabled by default; to disable https, pass `--disable-https` to the `ob deploy init` command above.
193200
194−Then go to that created deployment configuration directory, and initiate the deployment:
201+This step will also require that you manually verify the authenticity of the host `$SERVER`. Obelisk will save the fingerprint in a deployment-specific configuration. **Obelisk deployments do *not* rely on the `known_hosts` of your local machine.** This is because, in the event that you need to switch from one deploy machine / bastion host to another, you want to be absolutely sure that you're still connecting to the machines you think you are, even if that deploy machine / bastion host has never connected to them before. Obelisk explicitly avoids a workflow that encourages people to accept host keys without checking them, since that could result in leaking production secrets to anyone who manages to MITM you, e.g. via DNS spoofing or cache poisoning. (Note that an active attack is a circumstance where you may need to quickly switch bastion hosts, e.g. because the attacker has taken one down or you have taken it down in case it was compromised. In this circumstance you might need to deploy to production to fix an exploit or rotate keys, etc.) When you run `ob deploy` later it will rely on the saved verification in this step.
202+
203+Next, go to the deployment directory that you just initialized and deploy!
195204
196205```
197206cd ~/code/myapp-deploy