on master help sign in
Update README.md
commitf6439ba903074ba76abd1cd447e729ed33ea7d57 authorRyan Trinkle <ryan.trinkle@gmail.com> dateThu 4 Jan 2018, 11:17 (9 years ago) parentc250b43
1 file changed+33−24
README.md+33−24
README.md+33−24
@@ -1,29 +1,42 @@
1−Assuming you've already added SSH keys to your github account,
2−please proceed with the instructions that follow.
3−
4−In your new project's git repository:
5−
6−```bash
7−git init
8−```
9−The ob-init.hs script will add and update the obelisk submodule as well as
10−generate the necessary boilerplate files and folders. Enter the following in
11−your console, followed by your project's name when prompted.
1+## Installation
2+1. Set up nix caches
3+ 1. Add this to `/etc/nixos/configuration.nix`:
4+ ```nix
5+ nix.binaryCaches = [ "https://nixcache.reflex-frp.org" ];
6+ nix.binaryCachePublicKeys = [ "ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=" ];
7+ ```
8+1. Get set up to access private repositories
9+ 1. [Get set up to connect to GitHub with SSH](https://help.github.com/articles/connecting-to-github-with-ssh/)
10+ 1. [Create a GitHub personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)
11+ 1. Add this to `/etc/nixos/configuration.nix`:
12+ ```nix
13+ nix.envVars = {
14+ NIX_GITHUB_PRIVATE_USERNAME = "your-github-username";
15+ NIX_GITHUB_PRIVATE_PASSWORD = "your-github-personal-access-token";
16+ };
17+ ```
18+ 1. `nix-env -i hub`
19+ 1. `hub clone obsidiansystems/obelisk`
20+ * NOTE: you must authenticate with hub at least once, because the `ob` command uses `hub` for authentication
21+ #TODO: Make ob do this itself (either invoke hub automatically or not depend on hub)
22+1. Install `ob`: `nix-env -f obelisk -iA command`
23+
24+## Building
25+Build the frontend by running
1226
1327```bash
14−./ob-init.hs
28+nix-build -A ghcjs.frontend --out-link frontend-js
1529```
16−Build the frontend by running ./obelisk/build-frontend
1730
1831Now you can try running the backend in GHCi by running
1932
2033```bash
21−./obelisk/ghci-backend
34+nix-shell -A ghc.backend.env --run "cd backend; cabal repl"
2235```
2336and then typing
2437
2538```bash
26−>main
39+main
2740```
2841
2942at the GHCi prompt.
@@ -34,20 +47,20 @@ Feel free to edit the frontend and backend directories as you see fit.
3447
3548--------------------------DEVELOPER TOOLS----------------------------------------
3649
37−To increase developer productivity it is highly recommended to make use of the
50+To increase developer productivity it is highly recommended to make use of the
3851`ghcid-frontend` and `ghcid-backend` scripts. This will open a live repl that
39−will compile and refresh itself showing you the latest possible syntax or type errors
52+will compile and refresh itself showing you the latest possible syntax or type errors
4053as well as any other ghc warnings whenever files within their respective directories
4154are saved and updated.
4255
4356-----------------------DEPLOYMENT------------------------------------------------
4457
4558From Nix to NixOS:
46−When you feel your repository is ready to be deployed, feel free to utilize some scripts to aid in the process.
59+When you feel your repository is ready to be deployed, feel free to utilize some scripts to aid in the process.
4760
48−Assuming you have taken the neccessary steps in setting up your staging/production server: TODO Elaborate on this setup as well.
61+Assuming you have taken the neccessary steps in setting up your staging/production server: #TODO: Elaborate on this setup as well.
4962
50−From within the root of your obelisk project directory, use the script and syntax provided below:
63+From within the root of your obelisk project directory, use the script and syntax provided below:
5164
5265```bash
5366./set-deploy [DESTINATION DIR] [PRIVATE KEY FILE]
@@ -58,7 +71,3 @@ This script will create a `deploy` directory within the directory you've specifi
5871```bash
5972./obelisk/deploy [yourServer.org] .. --arg ssl true
6073```
61−
62−-------------------------------------------------------------------------------
63−
64−Thank you for using Obelisk.