@@ -99,14 +99,14 @@ In order to add package dependencies, declare them under the build-depends field
9999
100100### Adding package overrides
101101
102−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:
102+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:
103103
104104```nix
105105# ...
106106project ./. ({ pkgs, ... }: {
107107# ...
108108 overrides = self: super: let
109− aeson = pkgs.fetchFromGitHub {
109+ aesonSrc = pkgs.fetchFromGitHub {
110110 owner = "obsidiansystems";
111111 repo = "aeson-gadt-th";
112112 rev = "ed573c2cccf54d72aa6279026752a3fecf9c1383";
@@ -114,7 +114,12 @@ project ./. ({ pkgs, ... }: {
114114 };
115115 in
116116 {
117− aeson = self.callCabal2nix "aeson" aeson {};
117+ aeson = self.callCabal2nix "aeson" aesonSrc {};
118+ waargonaut = self.callHackageDirect {
119+ pkg = "waargonaut";
120+ ver = "0.8.0.1";
121+ sha256 = "1zv28np3k3hg378vqm89v802xr0g8cwk7gy3mr77xrzy5jbgpa39";
122+ } {};
118123 };
119124# ...
120125```
@@ -128,14 +133,16 @@ For further information see [the Haskell section](https://nixos.org/nixpkgs/manu
128133Build everything:
129134
130135```
131−nix-build -A exe -o result-exe
136+nix-build -A exe --no-out-link
132137```
133138
134−Run the server:
139+Copy the result to a new directory, add configuration, and run!
135140
136141```
137−cd result-exe
138−./backend
142+mkdir test-app
143+ln -s $(nix-build -A exe --no-out-link)/* test-app/
144+cp -r config test-app
145+(cd test-app && ./backend)
139146```
140147
141148### EC2
@@ -167,9 +174,11 @@ ob deploy init \
167174 ~/code/myapp-deploy
168175```
169176
170−NOTE: HTTPS is enabled by default; to disable https, pass `--disable-https` to the `ob deploy init` command above.
177+HTTPS is enabled by default; to disable https, pass `--disable-https` to the `ob deploy init` command above.
171178
172−Then go to that created deployment configuration directory, and initiate the deployment:
179+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.
180+
181+Next, go to the deployment directory that you just initialized and deploy!
173182
174183```
175184cd ~/code/myapp-deploy